miniupnp.tuxfamily.org Forum Index miniupnp.tuxfamily.org
The forum about miniupnp and libnatpmp
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

patch for MiniDLNA
Goto page 1, 2  Next
 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation
View previous topic :: View next topic  
Author Message
HonzaCZ



Joined: 31 Jan 2011
Posts: 3

PostPosted: Mon Jan 31, 2011 12:25 am    Post subject: patch for MiniDLNA Reply with quote

Hi,

Can anyone help me with making of patch for MiniDLNA to using MiniSSDPd?

I want to use MiniUPNPd and MiniDLNA simultaneously.

Thanks.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1593

PostPosted: Tue Feb 01, 2011 2:36 pm    Post subject: Reply with quote

I'll try to have a look at it soon.

http://sourceforge.net/projects/minidlna/
http://minidlna.sourceforge.net/
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1593

PostPosted: Wed Feb 02, 2011 3:13 pm    Post subject: Reply with quote

have a look at this :
minidlna_1.0.18_minissdp1.patch

I also added the patch on the miniDLNA sourceforge :
http://sourceforge.net/tracker/?func=detail&aid=3170970&group_id=243163&atid=1121518
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
HonzaCZ



Joined: 31 Jan 2011
Posts: 3

PostPosted: Thu Feb 03, 2011 11:28 pm    Post subject: Reply with quote

Thanks, after some magic applied I made it work under FreeBSD Smile

I wanted to apply Samsung patch too, but I'm too lame... I can't fix this:
Code:
warning: cast from pointer to integer of different size

Part of problematic code from patch:
Code:
+/* append data to buffer, if necessary get more memory and rebase current ptr */
+void
+add_to_buffer(char** buffer, int* length, char** ptr, const char* data, int datalen)
+{
+    if (*ptr - *buffer > *length) {
+        *ptr -= (int)*buffer;
+        adjust_buffer(buffer, length);
+        *ptr += (int)*buffer; /* rebase ptr */
+    }
+    memcpy(*ptr, data, datalen);
+    *ptr += datalen;
+}
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1593

PostPosted: Fri Feb 04, 2011 9:26 am    Post subject: Reply with quote

HonzaCZ wrote:
Thanks, after some magic applied I made it work under FreeBSD Smile

I wanted to apply Samsung patch too, but I'm too lame... I can't fix this:
Code:
warning: cast from pointer to integer of different size

Part of problematic code from patch:
Code:
+/* append data to buffer, if necessary get more memory and rebase current ptr */
+void
+add_to_buffer(char** buffer, int* length, char** ptr, const char* data, int datalen)
+{
+    if (*ptr - *buffer > *length) {
+        *ptr -= (int)*buffer;
+        adjust_buffer(buffer, length);
+        *ptr += (int)*buffer; /* rebase ptr */
+    }
+    memcpy(*ptr, data, datalen);
+    *ptr += datalen;
+}

I guess you are compiling on a 64bit machine.
try to replace (int) by (int64_t).
Or maybe removing the cast is the solution.
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
HonzaCZ



Joined: 31 Jan 2011
Posts: 3

PostPosted: Fri Feb 04, 2011 10:36 am    Post subject: Reply with quote

miniupnp wrote:
I guess you are compiling on a 64bit machine.
try to replace (int) by (int64_t).
Or maybe removing the cast is the solution.
You are right! Solved! Thank you, so much Smile

There are my patches for actual FreeBSD port version (copy to /usr/ports/net/minidlna/files/):
http://temp.solc.name/patch-ssdpd
http://temp.solc.name/patch-zsamsung
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1593

PostPosted: Fri May 27, 2011 9:56 am    Post subject: Reply with quote

updated Patch for the new version of miniDLNA (1.0.19) :
minidlna_1.0.19_minissdp1.patch
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
coatto87



Joined: 28 May 2011
Posts: 1

PostPosted: Sat May 28, 2011 10:20 am    Post subject: Reply with quote

miniupnp wrote:
updated Patch for the new version of miniDLNA (1.0.19) :


It doesn't work on the latest cvs of miniDLNA.

Code:


Applying ./patches/050-minissdpd.patch using plaintext:
patching file codelength.h
patching file minidlna.c
Hunk #1 succeeded at 554 (offset 14 lines).
Hunk #2 succeeded at 943 (offset 15 lines).
patching file minissdp.c
Hunk #2 succeeded at 45 with fuzz 2 (offset 2 lines).
Hunk #3 succeeded at 74 (offset 2 lines).
Hunk #4 succeeded at 248 (offset 12 lines).
Hunk #5 FAILED at 343.
Hunk #6 succeeded at 381 with fuzz 2 (offset 18 lines).
Hunk #7 succeeded at 677 (offset 206 lines).
Hunk #8 succeeded at 741 (offset 206 lines).
1 out of 8 hunks FAILED -- saving rejects to file minissdp.c.rej
patching file minissdp.h
patching file options.c
patching file options.h
patching file upnpglobalvars.c
patching file upnpglobalvars.h
Hunk #1 succeeded at 205 (offset 15 lines).
Patch failed!  Please fix ./patches/050-minissdpd.patch!


minissdp.c.rej
Code:

--- minissdp.c   2011-03-15 03:50:13.000000000 +0100
+++ minissdp.c   2011-05-27 11:46:53.000000000 +0200
@@ -343,17 +350,12 @@
  * process SSDP M-SEARCH requests and responds to them */
 void
 ProcessSSDPRequest(int s, unsigned short port)
-/*ProcessSSDPRequest(int s, struct lan_addr_s * lan_addr, int n_lan_addr,
-                   unsigned short port)*/
 {
    int n;
    char bufr[1500];
    socklen_t len_r;
    struct sockaddr_in sendername;
-   int i, l;
-   int lan_addr_index = 0;
-   char * st = NULL, * mx = NULL, * man = NULL, * mx_end = NULL;
-   int st_len = 0, mx_len = 0, man_len = 0, mx_val = 0;
+
    len_r = sizeof(struct sockaddr_in);
 
    n = recvfrom(s, bufr, sizeof(bufr), 0,
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1593

PostPosted: Sat May 28, 2011 2:01 pm    Post subject: Reply with quote

coatto87 wrote:
miniupnp wrote:
updated Patch for the new version of miniDLNA (1.0.19) :


It doesn't work on the latest cvs of miniDLNA.

The rejected part doesn't look important. I think it's going to work Wink
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1593

PostPosted: Sun May 29, 2011 9:20 pm    Post subject: Reply with quote

Patch for the current CVS version of miniDLNA :
minidlna_cvs20110529_minissdp1.patch
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
AzaToth



Joined: 31 May 2011
Posts: 3

PostPosted: Tue May 31, 2011 12:53 pm    Post subject: Reply with quote

Have applied the patch for my github repo in the minissdp branch

Before I merge it into main line I would require to know whom is the author though.
Back to top
View user's profile Send private message
AzaToth



Joined: 31 May 2011
Posts: 3

PostPosted: Tue May 31, 2011 12:54 pm    Post subject: Reply with quote

https://github.com/azatoth/minidlna/tree/minissdp as I had to have an post before I could post links...
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1593

PostPosted: Tue May 31, 2011 9:25 pm    Post subject: Reply with quote

AzaToth wrote:
Have applied the patch for my github repo in the minissdp branch

Before I merge it into main line I would require to know whom is the author though.

The author of the patch is me, Thomas Bernard Wink
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
AzaToth



Joined: 31 May 2011
Posts: 3

PostPosted: Tue May 31, 2011 10:17 pm    Post subject: Reply with quote

miniupnp wrote:
AzaToth wrote:
Have applied the patch for my github repo in the minissdp branch

Before I merge it into main line I would require to know whom is the author though.

The author of the patch is me, Thomas Bernard Wink

Ok, merged: https://github.com/azatoth/minidlna
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1593

PostPosted: Mon Jul 25, 2011 3:07 pm    Post subject: Reply with quote

Patch for MiniDLNA version 1.0.21 :
minidlna_1.0.21.minissdp1.patch
Also read here : https://sourceforge.net/tracker/?func=detail&aid=3170970&group_id=243163&atid=1121518
_________________
Main miniUPnP author.
https://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpd Compilation/Installation All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP
© 2007 Thomas Bernard, author of MiniUPNP.