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 

wrong version string

 
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Bugs
View previous topic :: View next topic  
Author Message
livings124



Joined: 08 Dec 2007
Posts: 10

PostPosted: Thu Jun 04, 2009 12:23 am    Post subject: wrong version string Reply with quote

It appears that the MINIUPNPC_VERSION_STRING in miniupnpcstrings.h is still 1.2 even though it's 1.3.

Also, out of curiosity, why is the OS_STRING hardcoded as "Debian/4.0"?
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1525

PostPosted: Thu Jun 04, 2009 9:05 am    Post subject: Re: wrong version string Reply with quote

livings124 wrote:
It appears that the MINIUPNPC_VERSION_STRING in miniupnpcstrings.h is still 1.2 even though it's 1.3.

Also, out of curiosity, why is the OS_STRING hardcoded as "Debian/4.0"?


Thanks for pointing that.
You can use updateminiupnpcstrings.sh to update OS_STRING
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
livings124



Joined: 08 Dec 2007
Posts: 10

PostPosted: Thu Jun 04, 2009 12:02 pm    Post subject: Reply with quote

I'm running that script (in that directory) and get displayed in terminal:

Code:
setting OS_STRING macro value to Darwin/9.7.0 in miniupnpcstrings.h..


But miniupnpcstrings.h still contains #define OS_STRING "Debian/4.0".
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1525

PostPosted: Thu Jun 04, 2009 9:16 pm    Post subject: Reply with quote

sorry for the bug.
Code:

diff -u -r1.1 -r1.2
--- updateminiupnpcstrings.sh   11 Oct 2008 16:39:29 -0000      1.1
+++ updateminiupnpcstrings.sh   4 Jun 2009 09:13:53 -0000       1.2
@@ -1,5 +1,5 @@
 #! /bin/sh
-# $Id: updateminiupnpcstrings.sh,v 1.1 2008/10/11 16:39:29 nanard Exp $
+# $Id: updateminiupnpcstrings.sh,v 1.2 2009/06/04 09:13:53 nanard Exp $
 
 FILE=miniupnpcstrings.h
 
@@ -27,7 +27,7 @@
 
 echo "Detected OS [$OS_NAME] version [$OS_VERSION]"
 
-EXPR="s/OS_STRING\s\".*\"/OS_STRING \"${OS_NAME}\/${OS_VERSION}\"/"
+EXPR="s/OS_STRING \".*\"/OS_STRING \"${OS_NAME}\/${OS_VERSION}\"/"
 #echo $EXPR
 echo "Backuping $FILE to $FILE.bak."
 cp $FILE $FILE.bak

_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
livings124



Joined: 08 Dec 2007
Posts: 10

PostPosted: Thu Jun 04, 2009 11:52 pm    Post subject: Reply with quote

That does the trick! Can I recommend not creating a backup file - I don't see the need since it's a trivial change and adding files is annoying with the svn viewer.
Back to top
View user's profile Send private message
livings124



Joined: 08 Dec 2007
Posts: 10

PostPosted: Sun Jun 07, 2009 1:21 pm    Post subject: Reply with quote

Would it be too much to request that miniupnpcstrings.h be removed or renamed to something like miniupnpcstrings.h.in, and require the script to be run before building to generate the miniupnpstrings.h? Miniupnp is included with our code through svn, so we need the file included, but every time we have to check in changes it asks us to commit this updated version. It would be a lot easier to simply set it to create miniupnpstrings.h when building, and have svn ignore that file. It would also ensure people don't use the wrong operating system string, which we have been doing for a while apparently.

Alternatively, if the OS detection could be done in the actual code, that would be the ideal solution.
Back to top
View user's profile Send private message
livings124



Joined: 08 Dec 2007
Posts: 10

PostPosted: Tue Jul 07, 2009 1:20 am    Post subject: Reply with quote

Hate to bump, but I really would like to know about this.
Back to top
View user's profile Send private message
miniupnp
Site Admin


Joined: 14 Apr 2007
Posts: 1525

PostPosted: Tue Jul 07, 2009 8:42 am    Post subject: Reply with quote

I had no time to do the modification yet...
_________________
Main miniUPnP author.
http://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: 1525

PostPosted: Mon Jul 13, 2009 9:00 am    Post subject: Reply with quote

done miniupnpc-20090713.tar.gz
_________________
Main miniUPnP author.
http://miniupnp.tuxfamily.org/
Back to top
View user's profile Send private message Visit poster's website
livings124



Joined: 08 Dec 2007
Posts: 10

PostPosted: Mon Jul 13, 2009 12:21 pm    Post subject: Reply with quote

Great, thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    miniupnp.tuxfamily.org Forum Index -> miniupnpc Bugs All times are GMT
Page 1 of 1

 
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.