]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
MODENDP-167
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 9 Jan 2009 23:21:38 +0000 (23:21 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 9 Jan 2009 23:21:38 +0000 (23:21 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11106 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index 6f0a2727ad4aa5b2b91e09b1a2903db3a5449b33..bcb8783db2b99f8e08e4544033f24615b7d94e47 100644 (file)
@@ -2675,12 +2675,12 @@ static void general_event_handler(switch_event_t *event)
 
                                if (call_id) {
                                        sql = switch_mprintf("select sip_user,sip_host,contact,profile_name,'%q','%q','%q' "
-                                                                                "from sip_registrations where call_id='%q'", ct, es, body, call_id
+                                                                                "from sip_registrations where call_id='%q'", ct, es, switch_str_nil(body), call_id
                                                                                 );
                                } else {
                                        sql = switch_mprintf("select sip_user,sip_host,contact,profile_name,'%q','%q','%q' "
                                                                                 "from sip_registrations where sip_user='%s' and sip_host='%q'",
-                                                                                ct, es, body, user, host
+                                                                                ct, es, switch_str_nil(body), switch_str_nil(user), switch_str_nil(host)
                                                                                 );
                                }