~ubuntu-branches/ubuntu/vivid/mediatomb/vivid

« back to all changes in this revision

Viewing changes to tombupnp/upnp/src/gena/gena_device.c

  • Committer: Bazaar Package Importer
  • Author(s): Andres Mejia
  • Date: 2008-03-02 13:09:16 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080302130916-zlljdze3kt7vuq4b
Tags: 0.11.0-1
* New upstream release.
* Include message about which inotify headers will be used when enabling
  inotify runtime support.
* Fixed error with use of INTERFACE in init script. Also removed use of -m
  option.
* Including new config.xml options.
* Added more build dependencies for new upstream release.
* Removed build dependency of libid3-dev, taglib is now preferred.
* mediatomb.xpm and manpage.xml is now included in orig tarball.
* inotify patch is not needed anymore.
* md5 patch has been committed upstream and is no longer needed. Also removed
  README.Debian.
* TwinHelix PNG fix is now used. Removed from TODO.
* Adding dependency of iceweasel for mediatomb package.
* Updated copyright file.
* Updated watch file.
* Updated rules file for proper configure options.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    
33
33
    TombUPnP - a library for developing UPnP applications.
34
34
    
35
 
    Copyright (C) 2006-2007 Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
 
35
    Copyright (C) 2006-2008 Sergey 'Jin' Bostandzhyan <jin@mediatomb.cc>
36
36
    
37
37
    This library is free software; you can redistribute it and/or
38
38
    modify it under the terms of the GNU Lesser General Public
46
46
    You should have received a copy of the GNU Lesser General Public
47
47
    License along with this library; if not, write to the Free Software
48
48
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
49
    
 
50
    $Id: gena_device.c 1698 2008-02-23 20:48:30Z lww $
49
51
*/
50
52
 
51
53
#include "config.h"
251
253
    // send msg (note +1 for propertyset; null-terminator is also sent)
252
254
    if( ( ret_code = http_SendMessage( &info, &timeout,
253
255
                                       "bb",
254
 
                                       start_msg.buf, start_msg.length,
 
256
                                       start_msg.buf, (size_t)start_msg.length,
255
257
                                       propertySet,
256
258
                                       strlen( propertySet ) + 1 ) ) !=
257
259
        0 ) {
590
592
    }
591
593
 
592
594
    sprintf( headers, "CONTENT-TYPE: text/xml; charset=UTF-8\r\nCONTENT-LENGTH: "
593
 
             "%d\r\nNT: upnp:event\r\nNTS: upnp:propchange\r\n",
 
595
             "%zu\r\nNT: upnp:event\r\nNTS: upnp:propchange\r\n",
594
596
             strlen( propertySet ) + 1 );
595
597
 
596
598
    //schedule thread for initial notification
775
777
    }
776
778
 
777
779
    sprintf( headers, "CONTENT-TYPE: text/xml; charset=UTF-8\r\nCONTENT-LENGTH: "
778
 
             OFF_T_SPRINTF"d" "\r\nNT: upnp:event\r\nNTS: upnp:propchange\r\n",
779
 
             (off_t) strlen( propertySet ) + 1 );
 
780
             "%ld" "\r\nNT: upnp:event\r\nNTS: upnp:propchange\r\n",
 
781
             (long) strlen( propertySet ) + 1 );
780
782
 
781
783
    //schedule thread for initial notification
782
784
 
912
914
    //changed to add null terminator at end of content
913
915
    //content length = (length in bytes of property set) + null char
914
916
    sprintf( headers, "CONTENT-TYPE: text/xml; charset=UTF-8\r\nCONTENT-LENGTH: "
915
 
             OFF_T_SPRINTF"d" "\r\nNT: upnp:event\r\nNTS: upnp:propchange\r\n",
916
 
             (off_t) strlen( propertySet ) + 1 );
 
917
             "%ld" "\r\nNT: upnp:event\r\nNTS: upnp:propchange\r\n",
 
918
             (long) strlen( propertySet ) + 1 );
917
919
 
918
920
    HandleLock(  );
919
921
 
1073
1075
    }
1074
1076
    //changed to add null terminator at end of content
1075
1077
    //content length = (length in bytes of property set) + null char
1076
 
    sprintf( headers, "CONTENT-TYPE: text/xml; charset=UTF-8\r\nCONTENT-LENGTH: " OFF_T_SPRINTF"d" "\r\nNT:"
 
1078
    sprintf( headers, "CONTENT-TYPE: text/xml; charset=UTF-8\r\nCONTENT-LENGTH: " "%ld" "\r\nNT:"
1077
1079
             " upnp:event\r\nNTS: upnp:propchange\r\n",
1078
 
             (off_t) strlen( propertySet ) + 1 );
 
1080
             (long) strlen( propertySet ) + 1 );
1079
1081
 
1080
1082
    HandleLock(  );
1081
1083
 
1194
1196
    }
1195
1197
 
1196
1198
    return_code = http_SendMessage( info, &upnp_timeout, "b",
1197
 
                                    response.buf, response.length );
 
1199
                                    response.buf, (size_t)response.length );
1198
1200
 
1199
1201
    membuffer_destroy( &response );
1200
1202