<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi Arto,<br>
<br>
No, there should be no offset at all. The is_gflag function takes
as parameter the index of the bit to be checked, while the MI
functions (like set_gflag) take as parameter a bitmask with all
the bits to be operated with.<br>
<br>
So, if you setting the bitmask 2 -> you set bit index 1
(2<<1) . With bitmask 1 you set the bit index 0 (2<<0).<br>
<br>
Regards,<br>
</tt>
<pre class="moz-signature" cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
<a class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
<div class="moz-cite-prefix">On 02/09/2018 01:43 PM, Arto Kuiri
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:HE1P189MB04126C0234C1AB02DD6884E99EF20@HE1P189MB0412.EURP189.PROD.OUTLOOK.COM">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt;
color:rgb(0,0,0);
font-family:Calibri,Helvetica,sans-serif,"EmojiFont","Apple
Color Emoji","Segoe UI
Emoji",NotoColorEmoji,"Segoe UI
Symbol","Android Emoji",EmojiSymbols">
<p style="margin-top:0; margin-bottom:0">Hi,</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">I noticed that in
opensips script gflags and MI commands gflags is off by 1.</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">if i have this kind of
check:</p>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<div>if(is_gflag("1")) {<br>
xlog("** MAINTANCE MODE \n");<br>
}</div>
<p style="margin-top:0; margin-bottom:0"><br>
</p>
<p style="margin-top:0; margin-bottom:0">and I try to set it on
with MI command:</p>
<pre class="programlisting">opensipsctl fifo set_gflag 1</pre>
<p style="margin-top:0; margin-bottom:0">it wont work, but this
works:<br>
</p>
<pre class="programlisting">opensipsctl fifo set_gflag 2
is this intended? If it is, I think documentation should mention it?
Tested this with 2.4.x
Regards,
Arto Kuiri
</pre>
<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
</body>
</html>