[OpenSER-Devel] [ openser-Bugs-1872407 ] openserctl add user1 pass1 user at host.com fails with postgres

SourceForge.net noreply at sourceforge.net
Fri Jul 4 18:35:23 CEST 2008


Bugs item #1872407, was opened at 2008-01-15 22:11
Message generated for change (Comment added) made by henningw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1872407&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: tools
>Group: ver devel
>Status: Closed
>Resolution: Works For Me
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Henning Westerholt (henningw)
Summary: openserctl add user1 pass1 user at host.com fails with postgres

Initial Comment:
in check_db_alias(), the result of no found aliases doesn't return "0".


    if [ "$CNT" = "0" ] ; then
        ALIAS_DB_EXISTS=0
    else
        ALIAS_DB_EXISTS=1
    fi

Thise piece of code make it think it exists when it doesn't...

The problem comes from the formating of the postgres result which is:

count ------- 0 (1 row)

Adding "| /usr/bin/tail -n 1" returns nothing.






----------------------------------------------------------------------

>Comment By: Henning Westerholt (henningw)
Date: 2008-07-04 16:35

Message:
Logged In: YES 
user_id=337916
Originator: NO

tested with actual trunk, it works here.

./openserctl add user1 at localhost pass2
pgsql_query: /usr/bin/psql  -A -q -t -P fieldsep='      ' -h localhost -U
openser openser -c 'insert into subscriber (username,                      
  domain,ha1,ha1b,password) values
('user1','localhost','fe1377bea750b31d1af1e81015bd5d6f','042cabf48329460007b8e37ae38e0442','pass2');'
new user 'user1 at localhost' added


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1872407&group_id=139143



More information about the Devel mailing list