]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4507 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Wed, 8 Aug 2012 14:59:36 +0000 (09:59 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Wed, 8 Aug 2012 14:59:36 +0000 (09:59 -0500)
src/mod/endpoints/mod_sofia/sofia_presence.c

index 23db7d00946a8364a596422e206e2e42c8bd7c78..0433f84ba18589fa2411f682cdae09962ea7ab40 100644 (file)
@@ -2365,6 +2365,10 @@ static char *gen_pidf(char *user_agent, char *id, char *url, char *open, char *r
                        prpid = "onthephone";
                }
 
+               if (zstr(open)) {
+                       open = "open";
+               }
+
                ret = switch_mprintf("<?xml version=\"1.0\"?>\n"
                                                         "<!DOCTYPE presence PUBLIC \"-//IETF//DTD RFCxxxx XPIDF 1.0//EN\" \"xpidf.dtd\">\n"
                                                         "<presence>\n"
@@ -2945,7 +2949,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
                                open = "closed";
                        }
 
-                       if (open_closed) {
+                       if (!zstr(open_closed)) {
                                open = open_closed;
                        }
                        
@@ -2977,7 +2981,7 @@ static int sofia_presence_sub_callback(void *pArg, int argc, char **argv, char *
                        open = "closed";
                }
 
-               if (open_closed) {
+               if (!zstr(open_closed)) {
                        open = open_closed;
                }