]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
c'mon wtf
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 29 Aug 2007 19:33:27 +0000 (19:33 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 29 Aug 2007 19:33:27 +0000 (19:33 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5677 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c

index a0cc8ecb1e5139262cc1536ea58260c9fa904853..c218f8d046f509f8caf6fefacc43619342b550b4 100644 (file)
@@ -88,7 +88,8 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
                if(!switch_strlen_zero(logdir)) {
                        if ((path = switch_mprintf("%s/xml_cdr/%s.cdr.xml", logdir, switch_core_session_get_uuid(session)))) {
                                if ((fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) > -1) {
-                                       write(fd, xml_text, (unsigned) strlen(xml_text));
+                                       int wrote;
+                                       wrote = write(fd, xml_text, (unsigned) strlen(xml_text));
                                        close(fd);
                                        fd = -1;
                                } else {
@@ -160,7 +161,8 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
 
                        if ((path = switch_mprintf("%s/%s.cdr.xml", globals.errLogDir, switch_core_session_get_uuid(session)))) {
                                if ((fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR)) > -1) {
-                                       write(fd, xml_text, (unsigned) strlen(xml_text));
+                                       int wrote;
+                                       wrote = write(fd, xml_text, (unsigned) strlen(xml_text));
                                        close(fd);
                                        fd = -1;
                                } else {