bugzcxx-devel Mailing List for Bugzilla C/C++ XML-RPC proxy
Status: Alpha
Brought to you by:
mindstorm2600
You can subscribe to this list here.
2010 |
Jan
(17) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(6) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: BugzCXX D. <bug...@li...> - 2010-06-03 20:02:06
|
On 4 June 2010 01:20, Rakesh Pandit wrote: > On 3 June 2010 20:26, BugzCXX Developers wrote: >> Sounds nice, lets do this >> > > I have done the cloning saving every bit of commit information and > logs using git-svn. You can test using: > git clone git://gitorious.org/bugzcxx/bugzcxx.git > > Project page is: http://gitorious.org/bugzcxx Please add yourself as > member. You would need to generate ssh key pair and upload public key. > Once done apply for membership/administration and everything. Before > doing that verify everything is correct and acknowledge here ? > > Regards, > Between we have an wiki also there. Will check with mailing lists some other place. But I guess we can even continue over here for time being. -- Rakesh Pandit https://fedoraproject.org/wiki/User:Rakesh freedom, friends, features, first |
From: BugzCXX D. <bug...@li...> - 2010-06-03 19:50:40
|
On 3 June 2010 20:26, BugzCXX Developers wrote: > Sounds nice, lets do this > I have done the cloning saving every bit of commit information and logs using git-svn. You can test using: git clone git://gitorious.org/bugzcxx/bugzcxx.git Project page is: http://gitorious.org/bugzcxx Please add yourself as member. You would need to generate ssh key pair and upload public key. Once done apply for membership/administration and everything. Before doing that verify everything is correct and acknowledge here ? Regards, -- Rakesh Pandit https://fedoraproject.org/wiki/User:Rakesh freedom, friends, features, first |
From: BugzCXX D. <bug...@li...> - 2010-06-03 14:56:46
|
Sounds nice, lets do this Thanks Sent from my BlackBerry® device from Digicel -----Original Message----- From: BugzCXX Developers <bug...@li...> Date: Thu, 3 Jun 2010 12:08:43 To: <bug...@li...> Subject: [bugzcxx-devel] regarding shifting project to gitorious Hello, You where talking about shifting project to some more useful/better place. I did some investigation and think http://gitorious.org/ would be nice place. It provides git for hosting your code. What do you think ? Should we continue here or move ? In case you are ok with moving I can do svn2git migration saving all our history/commit data and we can migrate. Once I complete migration I will ping you for checking the correctness. Suggestions ? /rakesh ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Bugzcxx-devel mailing list Bug...@li... https://lists.sourceforge.net/lists/listinfo/bugzcxx-devel |
From: BugzCXX D. <bug...@li...> - 2010-06-03 06:38:49
|
Hello, You where talking about shifting project to some more useful/better place. I did some investigation and think http://gitorious.org/ would be nice place. It provides git for hosting your code. What do you think ? Should we continue here or move ? In case you are ok with moving I can do svn2git migration saving all our history/commit data and we can migrate. Once I complete migration I will ping you for checking the correctness. Suggestions ? /rakesh |
From: BugzCXX D. <bug...@li...> - 2010-06-02 05:40:17
|
Hey! Those are very good news to hear my friend, on my side I've recently got hold of some spare time so I think I'll try to add some code here and there. Thanks a lot for your effort, cheers On Tue, Jun 1, 2010 at 8:04 AM, BugzCXX Developers < bug...@li...> wrote: > Hello, > > I am looking at 3.6 release changes in API and providing support to > it. Also looking at implementing python/perl bindings for our library. > > -- > Rakesh Pandit > https://fedoraproject.org/wiki/User:Rakesh > freedom, friends, features, first > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Bugzcxx-devel mailing list > Bug...@li... > https://lists.sourceforge.net/lists/listinfo/bugzcxx-devel > -- In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it's the exact opposite. -- Paul A. M. Dirac |
From: BugzCXX D. <bug...@li...> - 2010-06-01 13:04:37
|
Hello, I am looking at 3.6 release changes in API and providing support to it. Also looking at implementing python/perl bindings for our library. -- Rakesh Pandit https://fedoraproject.org/wiki/User:Rakesh freedom, friends, features, first |
From: BugzCXX D. <bug...@li...> - 2010-01-18 06:24:29
|
2010/1/18 BugzCXX Developers wrote: > Rakesh, > Need to find proper hosting for this, in the past I had a domain and a small > website for the project, no backup was ever made and the little effort made > was lost, now everything I have is coming from doxygen. > Don't know if I should use SF's hosting services, mediawiki is very slow > there perhaps you could suggest a good and free (as in beer) open source > project hosting provider. > Thanks > Two places come to my mind straight away: a) Fedorahosted (also provides trac wiki) b) savannah Will check with other place soon discuss, thanks. -- Rakesh Pandit https://fedoraproject.org/wiki/User:Rakesh freedom, friends, features, first |
From: BugzCXX D. <bug...@li...> - 2010-01-18 06:13:12
|
Rakesh, Need to find proper hosting for this, in the past I had a domain and a small website for the project, no backup was ever made and the little effort made was lost, now everything I have is coming from doxygen. Don't know if I should use SF's hosting services, mediawiki is very slow there perhaps you could suggest a good and free (as in beer) open source project hosting provider. Thanks On Fri, Jan 15, 2010 at 5:52 AM, BugzCXX Developers < bug...@li...> wrote: > Another trivial change. I have updated old doxygen configuration files > with `doxygen -u' . It suppresses the warnings and knocks off old > variables form file. In keeping with old file I have removed out > comments. > > Now our build is very clean. > > -- > Rakesh Pandit > https://fedoraproject.org/wiki/User:Rakesh > freedom, friends, features, first > > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for > Conference > attendees to learn about information security's most important issues > through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > Bugzcxx-devel mailing list > Bug...@li... > https://lists.sourceforge.net/lists/listinfo/bugzcxx-devel > -- In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it's the exact opposite. -- Paul A. M. Dirac |
From: BugzCXX D. <bug...@li...> - 2010-01-18 06:09:08
|
Excelent my friend, the new compiler flags helped me to fix my weak safe_getpass() function. Kudos On Fri, Jan 15, 2010 at 7:23 AM, BugzCXX Developers < bug...@li...> wrote: > For information I just pushed one more patch which will make out code > base extra sane. In case something breaks up please ping me, but > assurances that I try to keep every patch consistent and trunk safe. > But it is devel so it has to bleeding ;) > > I have set on the Werror flag so that every silly mistake will get > caught sooner then later. In short following changes were done: > > 1. Made "-D_GNU_SOURCE -Wall -Wshadow -Wunused -Wextra -Werror > -Wformat=2" as compiler flags. Suggested for standard projects. > Switched on Werror which will help keeping quality of code ;) > 2. Fixed implicit references to functions from xmlrpc_helper file. > 3. Removed unused variables. > 4. Fixed implicit declaration of strptime function. > 5. Commented out validate_url for later development and removed its > (not so sane) usage from init functions. > 6. Fixed wrongly declared static variable in bugzc/bugzc_product.c . > 7. Renamed timezone in examples/bugzc/gettimezone.c to time_zone > because it was shadowning declarations from time.h > 8. Fixed return value for bugzc_list_create from bugzc/bugzc_list.c. > > -- > Rakesh Pandit > https://fedoraproject.org/wiki/User:Rakesh > freedom, friends, features, first > > > Index: configure.ac > =================================================================== > --- configure.ac (revision 37) > +++ configure.ac (working copy) > @@ -64,7 +64,9 @@ > AC_PROG_INSTALL > AC_LANG_CPLUSPLUS > > -CXXFLAGS="$CXXFLAGS -Wall " > +COMPILER_FLAGS="-D_GNU_SOURCE -Wall -Wshadow -Wunused -Wextra -Werror > -Wformat=2" > +CXXFLAGS="$CXXFLAGS $COMPILER_FLAGS " > +CFLAGS="$CFLAGS $COMPILER_FLAGS " > > dnl ----------------------------------------------- > dnl Verify manual features > Index: bugzc/bugzc_bugzilla.c > =================================================================== > --- bugzc/bugzc_bugzilla.c (revision 37) > +++ bugzc/bugzc_bugzilla.c (working copy) > @@ -12,6 +12,7 @@ > > #include"config.h" > #include<bugzc/bugzc_bugzilla.h> > +#include<bugzc/xmlrpc_helper.h> > #include<string.h> > > extern const char *_bugz_errmsg[]; > Index: bugzc/xmlrpc_helper.c > =================================================================== > --- bugzc/xmlrpc_helper.c (revision 37) > +++ bugzc/xmlrpc_helper.c (working copy) > @@ -132,7 +132,6 @@ > const char *param, > const char *s){ > int ret = 0; > - char *tmp_ret; > xmlrpc_value *result = 0; > #ifdef RESPONSE_TIME_DEBUGGING > struct timeval t1, t2, tr; > Index: bugzc/bugzc_list.c > =================================================================== > --- bugzc/bugzc_list.c (revision 37) > +++ bugzc/bugzc_list.c (working copy) > @@ -52,6 +52,7 @@ > list->first = 0; > list->last = 0; > list->count = 0; > + return list; > } > > void bugzc_list_free(bugzc_list *list){ > Index: bugzc/bugzc_bug.c > =================================================================== > --- bugzc/bugzc_bug.c (revision 37) > +++ bugzc/bugzc_bug.c (working copy) > @@ -15,7 +15,9 @@ > #include"bugz_errcodes.h" > #include<string.h> > #include<stdlib.h> > +#ifndef _XOPEN_SOURCE > #define _XOPEN_SOURCE > +#endif > #include<time.h> > > extern const char *_bugz_errmsg[]; > @@ -26,7 +28,7 @@ > size_t max_vsize) > { > int ret = -1; > - int r_nitems; > + size_t r_nitems; > int i; > xmlrpc_value *result; > xmlrpc_value *v_list; > @@ -86,7 +88,7 @@ > } > else{ > ret = r_nitems; > - for(i = 0; i < r_nitems; i++){ > + for(i = 0; i < (int)r_nitems; i++){ > xmlrpc_array_read_item(&bconn->xenv, v_list, > i, &tmp_val); > xmlrpc_decompose_value(&bconn->xenv, > tmp_val, > @@ -308,12 +310,7 @@ > const char *op_sys, const char *platform, > const char *priority, const char *severity){ > int ret = -1; > - int r_nitems; > - int i; > xmlrpc_value *result; > - xmlrpc_value *v_list; > - xmlrpc_value *tmp_val; > - char *tmp_item_value; > if(bconn->url == 0){ > bconn->err_msg = (char > *)_bugz_errmsg[BUGZCXX_NO_INITIALIZED]; > bconn->err_code = BUGZCXX_NO_INITIALIZED; > @@ -408,20 +405,14 @@ > bugzc_bug *bugzc_bug_get_bugs(bugzc_conn *bconn, unsigned int *bug_ids, > size_t nbugid, size_t *rbugid){ > bugzc_bug *ret = 0; > - int r_nitems; > int i; > xmlrpc_value *result; > - xmlrpc_value *v_list; > - xmlrpc_value *tmp_val; > xmlrpc_value *int_array; > xmlrpc_value *int_item; > xmlrpc_value *bug_array; > xmlrpc_value *bug_item; > - xmlrpc_value *ctime; > - xmlrpc_value *lctime; > char *b_summary; > char *b_alias; > - char *tmp_str; > char *b_ctime; > char *b_lctime; > struct tm tmp_tm; > @@ -431,7 +422,7 @@ > return 0; > } > int_array = xmlrpc_array_new(&bconn->xenv); > - for(i = 0; i < nbugid; i++){ > + for(i = 0; i < (int)nbugid; i++){ > int_item = xmlrpc_build_value(&bconn->xenv, "i", > bug_ids[i]); > xmlrpc_array_append_item(&bconn->xenv, int_array, int_item); > } > @@ -486,7 +477,7 @@ > "{s:A,*}", "bugs", &bug_array); > *rbugid = xmlrpc_array_size(&bconn->xenv, bug_array); > ret = malloc(sizeof(bugzc_bug) * *rbugid); > - for(i = 0; i < *rbugid; i++){ > + for(i = 0; i < (int)*rbugid; i++){ > xmlrpc_array_read_item(&bconn->xenv, bug_array, i, > &bug_item); > xmlrpc_decompose_value(&bconn->xenv, bug_item, > "{s:s,s:i,s:s,s:8,s:8,*}", > @@ -521,20 +512,14 @@ > int bugzc_bug_get_bugs_list(bugzc_conn *bconn, unsigned int *bug_ids, > size_t nbugid, bugzc_list *olist){ > int ret = -1; > - int r_nitems; > int i, tmp_id; > xmlrpc_value *result; > - xmlrpc_value *v_list; > - xmlrpc_value *tmp_val; > xmlrpc_value *int_array; > xmlrpc_value *int_item; > xmlrpc_value *bug_array; > xmlrpc_value *bug_item; > - xmlrpc_value *ctime; > - xmlrpc_value *lctime; > char *b_summary; > char *b_alias; > - char *tmp_str; > char *b_ctime; > char *b_lctime; > bugzc_bug *bug_obj; > @@ -545,7 +530,7 @@ > } > bugzc_list_create(olist); > int_array = xmlrpc_array_new(&bconn->xenv); > - for(i = 0; i < nbugid; i++){ > + for(i = 0; i < (int)nbugid; i++){ > int_item = xmlrpc_build_value(&bconn->xenv, "i", > bug_ids[i]); > xmlrpc_array_append_item(&bconn->xenv, int_array, int_item); > } > Index: bugzc/bugzc_user.c > =================================================================== > --- bugzc/bugzc_user.c (revision 37) > +++ bugzc/bugzc_user.c (working copy) > @@ -13,6 +13,7 @@ > #include"config.h" > #include"bugzc_user.h" > #include"bugz_errcodes.h" > +#include<bugzc/xmlrpc_helper.h> > #ifdef RESPONSE_TIME_DEBUGGING > #include<sys/time.h> > #include<stdio.h> > Index: bugzc/bugzc_product.c > =================================================================== > --- bugzc/bugzc_product.c (revision 37) > +++ bugzc/bugzc_product.c (working copy) > @@ -59,7 +59,7 @@ > "ids", > olist); > } > > -const static char *pp[] = { > +static const char *pp[] = { > "id", > "name", > "description" > @@ -75,7 +75,6 @@ > xmlrpc_value *int_array; > xmlrpc_value *int_item; > int i, _id; > - int *val_s; > char *_name, *_description; > bugzc_product *tmp_product; > bugzc_list_create(olist); > Index: bugzc/bugzc.c > =================================================================== > --- bugzc/bugzc.c (revision 37) > +++ bugzc/bugzc.c (working copy) > @@ -23,22 +23,18 @@ > > static const char *__curl_transport = "curl"; > > > -/***************************************************************************/ > -static int validate_url(const char *url, size_t surl){ > - /** @todo: Write a function that can validate urls */ > - /* regex: http[s]?:\/\/[a-zA-Z0-9]*{\.[a-zA-Z0-9].....*/ > - return 1; > -} > +/* @todo: Write a function that can validate urls */ > +/* static int validate_url(const char *url, size_t surl){ */ > +/* /\* regex: http[s]?:\/\/[a-zA-Z0-9]*{\.[a-zA-Z0-9].....*\/ */ > +/* return 1; */ > +/* } */ > > static struct xmlrpc_clientparms global_xparms; > > int bugzc_init(bugzc_conn *bc, const char *url, size_t surl){ > bc->err_code = 0; > bc->err_msg = 0; > - if(!validate_url(url, surl)){ > - bc->url = 0; > - return -1; > - } > + /* Validate url using validate_url when it is written */ > bc->url = malloc(surl + 1); > strncpy(bc->url, url, surl); > bc->url[surl] = '\0'; > @@ -58,10 +54,7 @@ > bc->err_code = 0; > bc->err_msg = 0; > surl = strlen(url); > - if(!validate_url(url, surl)){ > - bc->url = 0; > - return -1; > - } > + /* Validate url using validate_url when it is written */ > bc->url = malloc(surl + 1); > strncpy(bc->url, url, surl); > bc->url[surl] = '\0'; > Index: examples/bugzc/gettimezone.c > =================================================================== > --- examples/bugzc/gettimezone.c (revision 37) > +++ examples/bugzc/gettimezone.c (working copy) > @@ -17,7 +17,7 @@ > > int main(int argc, char *argv[]){ > char *url; > - char timezone[36]; > + char time_zone[36]; > > bugzc_conn conn; > url = argv[1]; > @@ -34,7 +34,7 @@ > fprintf(stderr, "%s\n", conn.xenv.fault_string); > return 1; > } > - if(bugzc_bugzilla_timezone(&conn, timezone, 36) < 0){ > + if(bugzc_bugzilla_timezone(&conn, time_zone, 36) < 0){ > if(conn.err_code != 0){ > fprintf(stderr, "\n"); > if(conn.xenv.fault_occurred){ > @@ -47,7 +47,7 @@ > } > return 1; > } > - printf("is %s\n", timezone); > + printf("is %s\n", time_zone); > > return 0; > } > > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for > Conference > attendees to learn about information security's most important issues > through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > Bugzcxx-devel mailing list > Bug...@li... > https://lists.sourceforge.net/lists/listinfo/bugzcxx-devel > -- In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it's the exact opposite. -- Paul A. M. Dirac |
From: BugzCXX D. <bug...@li...> - 2010-01-15 12:54:32
|
For information I just pushed one more patch which will make out code base extra sane. In case something breaks up please ping me, but assurances that I try to keep every patch consistent and trunk safe. But it is devel so it has to bleeding ;) I have set on the Werror flag so that every silly mistake will get caught sooner then later. In short following changes were done: 1. Made "-D_GNU_SOURCE -Wall -Wshadow -Wunused -Wextra -Werror -Wformat=2" as compiler flags. Suggested for standard projects. Switched on Werror which will help keeping quality of code ;) 2. Fixed implicit references to functions from xmlrpc_helper file. 3. Removed unused variables. 4. Fixed implicit declaration of strptime function. 5. Commented out validate_url for later development and removed its (not so sane) usage from init functions. 6. Fixed wrongly declared static variable in bugzc/bugzc_product.c . 7. Renamed timezone in examples/bugzc/gettimezone.c to time_zone because it was shadowning declarations from time.h 8. Fixed return value for bugzc_list_create from bugzc/bugzc_list.c. -- Rakesh Pandit https://fedoraproject.org/wiki/User:Rakesh freedom, friends, features, first Index: configure.ac =================================================================== --- configure.ac (revision 37) +++ configure.ac (working copy) @@ -64,7 +64,9 @@ AC_PROG_INSTALL AC_LANG_CPLUSPLUS -CXXFLAGS="$CXXFLAGS -Wall " +COMPILER_FLAGS="-D_GNU_SOURCE -Wall -Wshadow -Wunused -Wextra -Werror -Wformat=2" +CXXFLAGS="$CXXFLAGS $COMPILER_FLAGS " +CFLAGS="$CFLAGS $COMPILER_FLAGS " dnl ----------------------------------------------- dnl Verify manual features Index: bugzc/bugzc_bugzilla.c =================================================================== --- bugzc/bugzc_bugzilla.c (revision 37) +++ bugzc/bugzc_bugzilla.c (working copy) @@ -12,6 +12,7 @@ #include"config.h" #include<bugzc/bugzc_bugzilla.h> +#include<bugzc/xmlrpc_helper.h> #include<string.h> extern const char *_bugz_errmsg[]; Index: bugzc/xmlrpc_helper.c =================================================================== --- bugzc/xmlrpc_helper.c (revision 37) +++ bugzc/xmlrpc_helper.c (working copy) @@ -132,7 +132,6 @@ const char *param, const char *s){ int ret = 0; - char *tmp_ret; xmlrpc_value *result = 0; #ifdef RESPONSE_TIME_DEBUGGING struct timeval t1, t2, tr; Index: bugzc/bugzc_list.c =================================================================== --- bugzc/bugzc_list.c (revision 37) +++ bugzc/bugzc_list.c (working copy) @@ -52,6 +52,7 @@ list->first = 0; list->last = 0; list->count = 0; + return list; } void bugzc_list_free(bugzc_list *list){ Index: bugzc/bugzc_bug.c =================================================================== --- bugzc/bugzc_bug.c (revision 37) +++ bugzc/bugzc_bug.c (working copy) @@ -15,7 +15,9 @@ #include"bugz_errcodes.h" #include<string.h> #include<stdlib.h> +#ifndef _XOPEN_SOURCE #define _XOPEN_SOURCE +#endif #include<time.h> extern const char *_bugz_errmsg[]; @@ -26,7 +28,7 @@ size_t max_vsize) { int ret = -1; - int r_nitems; + size_t r_nitems; int i; xmlrpc_value *result; xmlrpc_value *v_list; @@ -86,7 +88,7 @@ } else{ ret = r_nitems; - for(i = 0; i < r_nitems; i++){ + for(i = 0; i < (int)r_nitems; i++){ xmlrpc_array_read_item(&bconn->xenv, v_list, i, &tmp_val); xmlrpc_decompose_value(&bconn->xenv, tmp_val, @@ -308,12 +310,7 @@ const char *op_sys, const char *platform, const char *priority, const char *severity){ int ret = -1; - int r_nitems; - int i; xmlrpc_value *result; - xmlrpc_value *v_list; - xmlrpc_value *tmp_val; - char *tmp_item_value; if(bconn->url == 0){ bconn->err_msg = (char *)_bugz_errmsg[BUGZCXX_NO_INITIALIZED]; bconn->err_code = BUGZCXX_NO_INITIALIZED; @@ -408,20 +405,14 @@ bugzc_bug *bugzc_bug_get_bugs(bugzc_conn *bconn, unsigned int *bug_ids, size_t nbugid, size_t *rbugid){ bugzc_bug *ret = 0; - int r_nitems; int i; xmlrpc_value *result; - xmlrpc_value *v_list; - xmlrpc_value *tmp_val; xmlrpc_value *int_array; xmlrpc_value *int_item; xmlrpc_value *bug_array; xmlrpc_value *bug_item; - xmlrpc_value *ctime; - xmlrpc_value *lctime; char *b_summary; char *b_alias; - char *tmp_str; char *b_ctime; char *b_lctime; struct tm tmp_tm; @@ -431,7 +422,7 @@ return 0; } int_array = xmlrpc_array_new(&bconn->xenv); - for(i = 0; i < nbugid; i++){ + for(i = 0; i < (int)nbugid; i++){ int_item = xmlrpc_build_value(&bconn->xenv, "i", bug_ids[i]); xmlrpc_array_append_item(&bconn->xenv, int_array, int_item); } @@ -486,7 +477,7 @@ "{s:A,*}", "bugs", &bug_array); *rbugid = xmlrpc_array_size(&bconn->xenv, bug_array); ret = malloc(sizeof(bugzc_bug) * *rbugid); - for(i = 0; i < *rbugid; i++){ + for(i = 0; i < (int)*rbugid; i++){ xmlrpc_array_read_item(&bconn->xenv, bug_array, i, &bug_item); xmlrpc_decompose_value(&bconn->xenv, bug_item, "{s:s,s:i,s:s,s:8,s:8,*}", @@ -521,20 +512,14 @@ int bugzc_bug_get_bugs_list(bugzc_conn *bconn, unsigned int *bug_ids, size_t nbugid, bugzc_list *olist){ int ret = -1; - int r_nitems; int i, tmp_id; xmlrpc_value *result; - xmlrpc_value *v_list; - xmlrpc_value *tmp_val; xmlrpc_value *int_array; xmlrpc_value *int_item; xmlrpc_value *bug_array; xmlrpc_value *bug_item; - xmlrpc_value *ctime; - xmlrpc_value *lctime; char *b_summary; char *b_alias; - char *tmp_str; char *b_ctime; char *b_lctime; bugzc_bug *bug_obj; @@ -545,7 +530,7 @@ } bugzc_list_create(olist); int_array = xmlrpc_array_new(&bconn->xenv); - for(i = 0; i < nbugid; i++){ + for(i = 0; i < (int)nbugid; i++){ int_item = xmlrpc_build_value(&bconn->xenv, "i", bug_ids[i]); xmlrpc_array_append_item(&bconn->xenv, int_array, int_item); } Index: bugzc/bugzc_user.c =================================================================== --- bugzc/bugzc_user.c (revision 37) +++ bugzc/bugzc_user.c (working copy) @@ -13,6 +13,7 @@ #include"config.h" #include"bugzc_user.h" #include"bugz_errcodes.h" +#include<bugzc/xmlrpc_helper.h> #ifdef RESPONSE_TIME_DEBUGGING #include<sys/time.h> #include<stdio.h> Index: bugzc/bugzc_product.c =================================================================== --- bugzc/bugzc_product.c (revision 37) +++ bugzc/bugzc_product.c (working copy) @@ -59,7 +59,7 @@ "ids", olist); } -const static char *pp[] = { +static const char *pp[] = { "id", "name", "description" @@ -75,7 +75,6 @@ xmlrpc_value *int_array; xmlrpc_value *int_item; int i, _id; - int *val_s; char *_name, *_description; bugzc_product *tmp_product; bugzc_list_create(olist); Index: bugzc/bugzc.c =================================================================== --- bugzc/bugzc.c (revision 37) +++ bugzc/bugzc.c (working copy) @@ -23,22 +23,18 @@ static const char *__curl_transport = "curl"; -/***************************************************************************/ -static int validate_url(const char *url, size_t surl){ - /** @todo: Write a function that can validate urls */ - /* regex: http[s]?:\/\/[a-zA-Z0-9]*{\.[a-zA-Z0-9].....*/ - return 1; -} +/* @todo: Write a function that can validate urls */ +/* static int validate_url(const char *url, size_t surl){ */ +/* /\* regex: http[s]?:\/\/[a-zA-Z0-9]*{\.[a-zA-Z0-9].....*\/ */ +/* return 1; */ +/* } */ static struct xmlrpc_clientparms global_xparms; int bugzc_init(bugzc_conn *bc, const char *url, size_t surl){ bc->err_code = 0; bc->err_msg = 0; - if(!validate_url(url, surl)){ - bc->url = 0; - return -1; - } + /* Validate url using validate_url when it is written */ bc->url = malloc(surl + 1); strncpy(bc->url, url, surl); bc->url[surl] = '\0'; @@ -58,10 +54,7 @@ bc->err_code = 0; bc->err_msg = 0; surl = strlen(url); - if(!validate_url(url, surl)){ - bc->url = 0; - return -1; - } + /* Validate url using validate_url when it is written */ bc->url = malloc(surl + 1); strncpy(bc->url, url, surl); bc->url[surl] = '\0'; Index: examples/bugzc/gettimezone.c =================================================================== --- examples/bugzc/gettimezone.c (revision 37) +++ examples/bugzc/gettimezone.c (working copy) @@ -17,7 +17,7 @@ int main(int argc, char *argv[]){ char *url; - char timezone[36]; + char time_zone[36]; bugzc_conn conn; url = argv[1]; @@ -34,7 +34,7 @@ fprintf(stderr, "%s\n", conn.xenv.fault_string); return 1; } - if(bugzc_bugzilla_timezone(&conn, timezone, 36) < 0){ + if(bugzc_bugzilla_timezone(&conn, time_zone, 36) < 0){ if(conn.err_code != 0){ fprintf(stderr, "\n"); if(conn.xenv.fault_occurred){ @@ -47,7 +47,7 @@ } return 1; } - printf("is %s\n", timezone); + printf("is %s\n", time_zone); return 0; } |
From: BugzCXX D. <bug...@li...> - 2010-01-15 10:52:43
|
Another trivial change. I have updated old doxygen configuration files with `doxygen -u' . It suppresses the warnings and knocks off old variables form file. In keeping with old file I have removed out comments. Now our build is very clean. -- Rakesh Pandit https://fedoraproject.org/wiki/User:Rakesh freedom, friends, features, first |
From: BugzCXX D. <bug...@li...> - 2010-01-15 09:51:34
|
For information, I just did few trivial changes: ------------------------------------------------------------------------ r36 | rakeshpandit | 2010-01-15 15:12:34 +0530 (Fri, 15 Jan 2010) | 6 lines Removed two libtool generated files from examples/bugzc/: a) get_legal_field_values b) accountoffer ------------------------------------------------------------------------ r35 | rakeshpandit | 2010-01-15 15:03:40 +0530 (Fri, 15 Jan 2010) | 1 line Updated email in AUTHORS file. ------------------------------------------------------------------------ r34 | rakeshpandit | 2010-01-15 14:56:14 +0530 (Fri, 15 Jan 2010) | 1 line Removing accidentally added bugzc/.libs and bugzc/.deps folders. ------------------------------------------------------------------------ -- Rakesh Pandit https://fedoraproject.org/wiki/User:Rakesh freedom, friends, features, first |
From: BugzCXX D. <bug...@li...> - 2010-01-14 09:05:15
|
2010/1/14 BugzCXX Developers wrote: > Rakesh, > Even though every example program password prompt has been secured by means > of the getpass function we've failed to notice that such function has been > obsoleted as read from getpass(2) manual page so it seems we need to think > of a better way to overcome this, as you can see in the > examples/bugzcxx/testlogin.cpp there is a function called safe_getpass() > which is a very ugly implementation of getpass and basically what it does is > disable echo from the controlling terminal, then it gets user input and > re-enables echo again. > The way it was implemented is calling the stty command with the proper > parameters, which as I said is pretty ugly, I know we can work this out by > means of the tcsetattr function. > Can you take a look into this? > Thanks [..] Your investigation is true. I will have a look at it soon, thanks. -- Rakesh Pandit https://fedoraproject.org/wiki/User:Rakesh freedom, friends, features, first |
From: BugzCXX D. <bug...@li...> - 2010-01-14 06:53:43
|
Rakesh, I'm still unable to replicate this against a Bugzilla 3.2.5 installation, already tested it more than twice already and I had no luck trying to reproduce what you reported, next time it happens it would be useful if you could provide a wireshark capture so we can take a proper look into the xml-rpc dialog. Thanks On Thu, Jan 7, 2010 at 5:22 AM, BugzCXX Developers < bug...@li...> wrote: > Hello Juan, > > I was trying examples with live bugzilla.redhat.com using this line: > > [rakesh@simu bugzc]$ ./getbugs https://bugzilla.redhat.com/xmlrpc.cgi > rp...@re... 543433 > Bugzilla version at: https://bugzilla.redhat.com/xmlrpc.cgi is 3.2.5+ > Enter bugzilla password: > Querying info for #543433... > Bug id: 543433 > Summary: > Created On: � (4244782496754601) > Last Change On: (4244782496754601) > > /builddir/build/BUILD/xmlrpc-c-1.16.6/src/xmlrpc_client.c:622: assertion > failed > Aborted (core dumped) > [rakesh@simu bugzc]$ > > It gets bug details but gets a SIGABRT at bugzc_user_logout(&conn); > call in same example. Upon investigating I found following function > call from bugzc_bug.c at line 604 sets the bconn->xenv to > {fault_occurred = 1, fault_code = -501, fault_string = 0x626f50 "Value > of type ARRAY supplied where string type was expected."} which means > their is something wrong in there. May you suggest what could be wrong > with the expected format we are supplying in this call ? > > xmlrpc_decompose_value(&bconn->xenv, bug_item, > "{s:s,s:i,s:s,s:8,s:8,*}", > "summary", &b_summary, > "id", &tmp_id, > "alias", &b_alias, > "creation_time", > &b_ctime, > "last_change_time", > &b_lctime > ); > > > One more question, how do I investigate or come to know which API call > will throw what type of information so that I can select proper format > in decompose value function ? > > Below is a patch which fixes examples a bit more and makes them sane. > May you review it before I can commit ? Can I commit now or you will > approve my commit access in some time ? > > Log: > 1. Fixed password entry in all tests and made login as mandatory argument. > 2. Removed unused variables. > > Regards, > > -- > Rakesh Pandit > https://fedoraproject.org/wiki/User:Rakesh > freedom, friends, features, first > > Index: submit_bug.c > =================================================================== > --- submit_bug.c (revision 23) > +++ submit_bug.c (working copy) > @@ -13,6 +13,7 @@ > #include<stdio.h> > #include<string.h> > #include<stdlib.h> > +#include<unistd.h> > #include<bugzc/bugzc.h> > > char *fgets_s(char *str, size_t siz, FILE *fptr){ > @@ -29,10 +30,8 @@ > int main(int argc, char *argv[]){ > char *url; > char *login; > - char pw[24]; > + char *pass; > char version[12]; > - int i; > - > char product[65]; > char component[65]; > char summary[256]; > @@ -48,15 +47,15 @@ > > description[0] = 0; > if(argc <= 1){ > - fprintf(stderr, "At least you must provide bugzilla's > server url\n"); > + fprintf(stderr, "At least you must provide bugzilla's > server url > and login\n"); > return 0; > } > if(strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0){ > - printf("%s --help\n%s <url> [username] [field_name] > [product_name]\n\n"); > + printf("%s --help\n%s <url> [username] [field_name] > [product_name]\n\n", argv[0], argv[0]); > return 0; > } > url = argv[1]; > - > + login = argv[2]; > bugzc_init2(&conn, url); > printf("Bugzilla version at: %s ", conn.url); > fflush(stdout); > @@ -78,20 +77,9 @@ > fprintf(stderr, "%s\n", conn.xenv.fault_string); > return 1; > } > - if(argc > 2){ > - login = argv[2]; > - printf("\nLogin "); > - } > - else{ > - login = malloc(100); > - printf("\nLogin (or e-mail): "); > - login[99] = 0; > - fgets_s(login, 98, stdin); > - } > - printf("Password: "); > - fgets_s(pw, 23, stdin); > + pass = getpass("Enter bugzilla password: "); > /* Perform login */ > - if(bugzc_user_login(&conn, login, pw, 0) < 0){ > + if(bugzc_user_login(&conn, login, pass, 0) < 0){ > if(conn.err_code != 0){ > fprintf(stderr, "\n"); > if(conn.xenv.fault_occurred){ > @@ -104,7 +92,6 @@ > } > return 1; > } > - pw[0] = 0; > printf("Product: "); > fgets_s(product, 64, stdin); > printf("Component: "); > Index: get_products.c > =================================================================== > --- get_products.c (revision 23) > +++ get_products.c (working copy) > @@ -13,6 +13,7 @@ > #include<stdio.h> > #include<string.h> > #include<stdlib.h> > +#include<unistd.h> > #include<bugzc/bugzc.h> > > > @@ -67,9 +68,7 @@ > int main(int argc, char *argv[]){ > char *url; > char *login; > - char *field_name; > - char *product_name; > - char pw[24]; > + char *pass; > char version[12]; > int *p_ids; > int i; > @@ -78,16 +77,16 @@ > bugzc_list p_list; > bugzc_conn conn; > bugzc_node *node; > - if(argc <= 1){ > - fprintf(stderr, "At least you must provide bugzilla's > server url\n"); > + if(argc <= 2){ > + fprintf(stderr, "At least you must provide bugzilla's > server url > and login\n"); > return 0; > } > if(strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0){ > - printf("%s --help\n%s <url> [username]\n\n"); > + printf("%s --help\n%s <url> [username]\n\n", argv[0], > argv[0]); > return 0; > } > url = argv[1]; > - > + login = argv[2]; > bugzc_init2(&conn, url); > printf("Bugzilla version at: %s ", conn.url); > fflush(stdout); > @@ -109,20 +108,9 @@ > fprintf(stderr, "%s\n", conn.xenv.fault_string); > return 1; > } > - if(argc > 2){ > - login = argv[2]; > - printf("\nLogin "); > - } > - else{ > - login = malloc(100); > - printf("\nLogin (or e-mail): "); > - login[99] = 0; > - fgets(login, 98, stdin); > - } > - printf("Password: "); > - fgets(pw, 23, stdin); > + pass = getpass("Enter bugzilla password: "); > /* Perform login */ > - if(bugzc_user_login(&conn, login, pw, 0) < 0){ > + if(bugzc_user_login(&conn, login, pass, 0) < 0){ > if(conn.err_code != 0){ > fprintf(stderr, "\n"); > if(conn.xenv.fault_occurred){ > @@ -135,7 +123,6 @@ > } > return 1; > } > - pw[0] = 0; > bugzc_list_create(&list); > printf("Selectable product ids: "); > if(bugzc_product_get_selectable_products(&conn, &list) < 0){ > Index: get_legal_field_values.c > =================================================================== > --- get_legal_field_values.c (revision 23) > +++ get_legal_field_values.c (working copy) > @@ -13,6 +13,7 @@ > #include<stdio.h> > #include<string.h> > #include<stdlib.h> > +#include<unistd.h> > #include<bugzc/bugzc.h> > > char *fgets_s(char *str, size_t siz, FILE *fptr){ > @@ -31,22 +32,21 @@ > char *login; > char *field_name; > char *product_name; > - char pw[24]; > + char *pass; > char version[12]; > bugzc_list list; > - int i; > bugzc_conn conn; > bugzc_node *node; > - if(argc <= 1){ > - fprintf(stderr, "At least you must provide bugzilla's > server url\n"); > + if(argc <= 2){ > + fprintf(stderr, "At least you must provide bugzilla's > server url > and login\n"); > return 0; > } > if(strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0){ > - printf("%s --help\n%s <url> [username] [field_name] > [product_name]\n\n"); > + printf("%s --help\n%s <url> [username] [field_name] > [product_name]\n\n", argv[0], argv[0]); > return 0; > } > url = argv[1]; > - > + login = argv[2]; > bugzc_init2(&conn, url); > printf("Bugzilla version at: %s ", conn.url); > fflush(stdout); > @@ -68,20 +68,9 @@ > fprintf(stderr, "%s\n", conn.xenv.fault_string); > return 1; > } > - if(argc > 2){ > - login = argv[2]; > - printf("\nLogin "); > - } > - else{ > - login = malloc(100); > - printf("\nLogin (or e-mail): "); > - login[99] = 0; > - fgets(login, 98, stdin); > - } > - printf("Password: "); > - fgets(pw, 23, stdin); > + pass = getpass("Enter bugzilla password: "); > /* Perform login */ > - if(bugzc_user_login(&conn, login, pw, 0) < 0){ > + if(bugzc_user_login(&conn, login, pass, 0) < 0){ > if(conn.err_code != 0){ > fprintf(stderr, "\n"); > if(conn.xenv.fault_occurred){ > @@ -94,7 +83,6 @@ > } > return 1; > } > - pw[0] = 0; > if(argc > 3){ > field_name = argv[3]; > if(argc > 4) printf("\n"); > Index: bugz_create_user.c > =================================================================== > --- bugz_create_user.c (revision 23) > +++ bugz_create_user.c (working copy) > @@ -13,6 +13,7 @@ > #include<stdio.h> > #include<string.h> > #include<stdlib.h> > +#include<unistd.h> > #include<bugzc/bugzc.h> > > char *fgets_s(char *str, size_t siz, FILE *fptr){ > @@ -29,13 +30,13 @@ > int main(int argc, char *argv[]){ > char *url; > char *login; > - char pw[24]; > + char *pass; > char email[80]; > char fullname[80]; > char password[80]; > char version[12]; > bugzc_conn conn; > - if(argc <= 1){ > + if(argc <= 2){ > fprintf(stderr, "At least you must provide bugzilla's server > url" \ > " and your user login after > that.\n"); > return 0; > @@ -45,7 +46,6 @@ > > bugzc_init2(&conn, url); > printf("Bugzilla version at: %s ", conn.url); > - fflush(stdout); > if(bugzc_bugzilla_version(&conn, version, 12) < 0){ > if(conn.err_code != 0){ > fprintf(stderr, "\n"); > @@ -59,9 +59,9 @@ > return 1; > } > printf("is %s\n", version); > - printf("Enter password for %s: ", login); > - fgets(pw, 23, stdin); > - if(bugzc_user_login(&conn, login, pw, 0) < 0){ > + fflush(stdout); > + pass = getpass("Enter bugzilla password: "); > + if(bugzc_user_login(&conn, login, pass, 0) < 0){ > if(conn.err_code != 0){ > fprintf(stderr, "\n"); > if(conn.xenv.fault_occurred){ > @@ -73,7 +73,6 @@ > } > return 1; > } > - pw[0] = 0; > printf("Ready to create new user account...\n"); > printf("e-mail: "); > fgets_s(email, 79, stdin); > Index: testlogin.c > =================================================================== > --- testlogin.c (revision 23) > +++ testlogin.c (working copy) > @@ -13,22 +13,23 @@ > #include<stdio.h> > #include<string.h> > #include<stdlib.h> > +#include<unistd.h> > #include<bugzc/bugzc.h> > > > int main(int argc, char *argv[]){ > char *url; > char *login; > - char pw[24]; > + char *pass; > char version[12]; > char tzone[12]; > bugzc_conn conn; > - if(argc <= 1){ > - fprintf(stderr, "At least you must provide bugzilla's > server url\n"); > + if(argc <= 2){ > + fprintf(stderr, "At least you must provide bugzilla's > server url > and login\n"); > return 0; > } > url = argv[1]; > - > + login = argv[2]; > bugzc_init2(&conn, url); > printf("Bugzilla version at: %s ", conn.url); > fflush(stdout); > @@ -50,20 +51,9 @@ > fprintf(stderr, "%s\n", conn.xenv.fault_string); > return 1; > } > - if(argc > 2){ > - login = argv[2]; > - printf("\nLogin "); > - } > - else{ > - login = malloc(1024); > - printf("\nLogin (or e-mail): "); > - login[1023] = 0; > - fgets(login, 1022, stdin); > - } > - printf("Password: "); > - fgets(pw, 23, stdin); > + pass = getpass("Enter bugzilla password: "); > /* Perform login */ > - if(bugzc_user_login(&conn, login, pw, 0) < 0){ > + if(bugzc_user_login(&conn, login, pass, 0) < 0){ > if(conn.err_code != 0){ > fprintf(stderr, "\n"); > if(conn.xenv.fault_occurred){ > @@ -76,7 +66,6 @@ > } > return 1; > } > - pw[0] = 0; > printf("Server timezone: "); > fflush(stdout); > if(bugzc_bugzilla_timezone(&conn, tzone, 12) < 0){ > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Bugzcxx-devel mailing list > Bug...@li... > https://lists.sourceforge.net/lists/listinfo/bugzcxx-devel > -- In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it's the exact opposite. -- Paul A. M. Dirac |
From: BugzCXX D. <bug...@li...> - 2010-01-14 06:48:09
|
Rakesh, Even though every example program password prompt has been secured by means of the getpass function we've failed to notice that such function has been obsoleted as read from getpass(2) manual page so it seems we need to think of a better way to overcome this, as you can see in the examples/bugzcxx/testlogin.cpp there is a function called safe_getpass() which is a very ugly implementation of getpass and basically what it does is disable echo from the controlling terminal, then it gets user input and re-enables echo again. The way it was implemented is calling the stty command with the proper parameters, which as I said is pretty ugly, I know we can work this out by means of the tcsetattr function. Can you take a look into this? Thanks -- In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it's the exact opposite. -- Paul A. M. Dirac |
From: BugzCXX D. <bug...@li...> - 2010-01-14 06:41:39
|
No problem, thats great!!! On Wed, Jan 13, 2010 at 1:28 AM, BugzCXX Developers < bug...@li...> wrote: > I am planning to add gettext support in near future. So, it would be > great if you keep out output messages simple and clean. After that we > can request transifex instance running on some place (e.g > https://translate.fedoraproject.org/ ) for registering our project and > get translations from various people which are active contributors for > that specific project. > > Thanks, > > -- > Rakesh Pandit > https://fedoraproject.org/wiki/User:Rakesh > freedom, friends, features, first > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Bugzcxx-devel mailing list > Bug...@li... > https://lists.sourceforge.net/lists/listinfo/bugzcxx-devel > -- In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it's the exact opposite. -- Paul A. M. Dirac |
From: BugzCXX D. <bug...@li...> - 2010-01-14 06:05:07
|
That's right, they got there from my IDE, didn't notice it, I'll be deleting them. Thanks On Tue, Jan 12, 2010 at 1:50 AM, BugzCXX Developers < bug...@li...> wrote: > Hi, > > You recent commit has added many unwanted files and folders to svn. > May you remove them. > > They are: > > Files (probably from your IDE): > trunk/.project > trunk/.cproject > > Folders and files inside them: > bugzcxx/.deps > bugzcxx/.libs > examples/bugzc/.deps/ > examples/bugzc/.libs/ > examples/bugzcxx/.libs/ > examples/bugzcxx/.deps/ > > -- > Rakesh Pandit > https://fedoraproject.org/wiki/User:Rakesh > freedom, friends, features, first > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Bugzcxx-devel mailing list > Bug...@li... > https://lists.sourceforge.net/lists/listinfo/bugzcxx-devel > -- In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it's the exact opposite. -- Paul A. M. Dirac |
From: BugzCXX D. <bug...@li...> - 2010-01-13 06:28:13
|
I am planning to add gettext support in near future. So, it would be great if you keep out output messages simple and clean. After that we can request transifex instance running on some place (e.g https://translate.fedoraproject.org/ ) for registering our project and get translations from various people which are active contributors for that specific project. Thanks, -- Rakesh Pandit https://fedoraproject.org/wiki/User:Rakesh freedom, friends, features, first |
From: BugzCXX D. <bug...@li...> - 2010-01-12 06:51:00
|
Hi, You recent commit has added many unwanted files and folders to svn. May you remove them. They are: Files (probably from your IDE): trunk/.project trunk/.cproject Folders and files inside them: bugzcxx/.deps bugzcxx/.libs examples/bugzc/.deps/ examples/bugzc/.libs/ examples/bugzcxx/.libs/ examples/bugzcxx/.deps/ -- Rakesh Pandit https://fedoraproject.org/wiki/User:Rakesh freedom, friends, features, first |
From: BugzCXX D. <bug...@li...> - 2010-01-11 13:55:52
|
2010/1/9 BugzCXX Developers wrote: > Hello Rakesh, > I'm testing your patches right now, thanks for all the help, I'll let you > know when they're approved. > Regarding the issue you're reporting with get_bugs I'm having some trouble > to reproduce it, need to test this a lot more, may I suggest you to open bug > report at sourceforge for it? > API for mozilla XML-RPC web service can be found > here: http://www.bugzilla.org/docs/3.2/en/html/api/ Take a look at the > bottom where the Bugzilla::WebService::* modules are. > If you'll be granted commit access soon you ask? it seems to me that you > will!!! Yep I need it ;) Everything seems to be cool now with not much warnings except Doxygen file which needs to be regenerated. May you regrenerate it. Between I compiled with CFLAGS: [rakesh@simu trunk]$ CFLAGS="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic" make > /dev/null Warning: Tag `USE_WINDOWS_ENCODING' at line 11 of file Doxyfile has become obsolete. To avoid this warning please update your configuration file using "doxygen -u" Warning: Tag `DETAILS_AT_TOP' at line 33 of file Doxyfile has become obsolete. To avoid this warning please update your configuration file using "doxygen -u" Warning: Tag `MAX_DOT_GRAPH_WIDTH' at line 232 of file Doxyfile has become obsolete. To avoid this warning please update your configuration file using "doxygen -u" Warning: Tag `MAX_DOT_GRAPH_HEIGHT' at line 233 of file Doxyfile has become obsolete. To avoid this warning please update your configuration file using "doxygen -u" Warning: Tag `USE_WINDOWS_ENCODING' at line 11 of file Doxyfile has become obsolete. To avoid this warning please update your configuration file using "doxygen -u" Warning: Tag `DETAILS_AT_TOP' at line 23 of file Doxyfile has become obsolete. To avoid this warning please update your configuration file using "doxygen -u" Warning: Tag `MAX_DOT_GRAPH_WIDTH' at line 215 of file Doxyfile has become obsolete. To avoid this warning please update your configuration file using "doxygen -u" Warning: Tag `MAX_DOT_GRAPH_HEIGHT' at line 216 of file Doxyfile has become obsolete. To avoid this warning please update your configuration file using "doxygen -u" -- Rakesh Pandit https://fedoraproject.org/wiki/User:Rakesh freedom, friends, features, first |
From: BugzCXX D. <bug...@li...> - 2010-01-09 03:08:06
|
Hello Rakesh, I'm testing your patches right now, thanks for all the help, I'll let you know when they're approved. Regarding the issue you're reporting with get_bugs I'm having some trouble to reproduce it, need to test this a lot more, may I suggest you to open bug report at sourceforge for it? API for mozilla XML-RPC web service can be found here: http://www.bugzilla.org/docs/3.2/en/html/api/ Take a look at the bottom where the Bugzilla::WebService::* modules are. If you'll be granted commit access soon you ask? it seems to me that you will!!! Thank you On Thu, Jan 7, 2010 at 5:22 AM, BugzCXX Developers < bug...@li...> wrote: > Hello Juan, > > I was trying examples with live bugzilla.redhat.com using this line: > > [rakesh@simu bugzc]$ ./getbugs https://bugzilla.redhat.com/xmlrpc.cgi > rp...@re... 543433 > Bugzilla version at: https://bugzilla.redhat.com/xmlrpc.cgi is 3.2.5+ > Enter bugzilla password: > Querying info for #543433... > Bug id: 543433 > Summary: > Created On: � (4244782496754601) > Last Change On: (4244782496754601) > > /builddir/build/BUILD/xmlrpc-c-1.16.6/src/xmlrpc_client.c:622: assertion > failed > Aborted (core dumped) > [rakesh@simu bugzc]$ > > It gets bug details but gets a SIGABRT at bugzc_user_logout(&conn); > call in same example. Upon investigating I found following function > call from bugzc_bug.c at line 604 sets the bconn->xenv to > {fault_occurred = 1, fault_code = -501, fault_string = 0x626f50 "Value > of type ARRAY supplied where string type was expected."} which means > their is something wrong in there. May you suggest what could be wrong > with the expected format we are supplying in this call ? > > xmlrpc_decompose_value(&bconn->xenv, bug_item, > "{s:s,s:i,s:s,s:8,s:8,*}", > "summary", &b_summary, > "id", &tmp_id, > "alias", &b_alias, > "creation_time", > &b_ctime, > "last_change_time", > &b_lctime > ); > > > One more question, how do I investigate or come to know which API call > will throw what type of information so that I can select proper format > in decompose value function ? > > Below is a patch which fixes examples a bit more and makes them sane. > May you review it before I can commit ? Can I commit now or you will > approve my commit access in some time ? > > Log: > 1. Fixed password entry in all tests and made login as mandatory argument. > 2. Removed unused variables. > > Regards, > > -- > Rakesh Pandit > https://fedoraproject.org/wiki/User:Rakesh > freedom, friends, features, first > > Index: submit_bug.c > =================================================================== > --- submit_bug.c (revision 23) > +++ submit_bug.c (working copy) > @@ -13,6 +13,7 @@ > #include<stdio.h> > #include<string.h> > #include<stdlib.h> > +#include<unistd.h> > #include<bugzc/bugzc.h> > > char *fgets_s(char *str, size_t siz, FILE *fptr){ > @@ -29,10 +30,8 @@ > int main(int argc, char *argv[]){ > char *url; > char *login; > - char pw[24]; > + char *pass; > char version[12]; > - int i; > - > char product[65]; > char component[65]; > char summary[256]; > @@ -48,15 +47,15 @@ > > description[0] = 0; > if(argc <= 1){ > - fprintf(stderr, "At least you must provide bugzilla's > server url\n"); > + fprintf(stderr, "At least you must provide bugzilla's > server url > and login\n"); > return 0; > } > if(strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0){ > - printf("%s --help\n%s <url> [username] [field_name] > [product_name]\n\n"); > + printf("%s --help\n%s <url> [username] [field_name] > [product_name]\n\n", argv[0], argv[0]); > return 0; > } > url = argv[1]; > - > + login = argv[2]; > bugzc_init2(&conn, url); > printf("Bugzilla version at: %s ", conn.url); > fflush(stdout); > @@ -78,20 +77,9 @@ > fprintf(stderr, "%s\n", conn.xenv.fault_string); > return 1; > } > - if(argc > 2){ > - login = argv[2]; > - printf("\nLogin "); > - } > - else{ > - login = malloc(100); > - printf("\nLogin (or e-mail): "); > - login[99] = 0; > - fgets_s(login, 98, stdin); > - } > - printf("Password: "); > - fgets_s(pw, 23, stdin); > + pass = getpass("Enter bugzilla password: "); > /* Perform login */ > - if(bugzc_user_login(&conn, login, pw, 0) < 0){ > + if(bugzc_user_login(&conn, login, pass, 0) < 0){ > if(conn.err_code != 0){ > fprintf(stderr, "\n"); > if(conn.xenv.fault_occurred){ > @@ -104,7 +92,6 @@ > } > return 1; > } > - pw[0] = 0; > printf("Product: "); > fgets_s(product, 64, stdin); > printf("Component: "); > Index: get_products.c > =================================================================== > --- get_products.c (revision 23) > +++ get_products.c (working copy) > @@ -13,6 +13,7 @@ > #include<stdio.h> > #include<string.h> > #include<stdlib.h> > +#include<unistd.h> > #include<bugzc/bugzc.h> > > > @@ -67,9 +68,7 @@ > int main(int argc, char *argv[]){ > char *url; > char *login; > - char *field_name; > - char *product_name; > - char pw[24]; > + char *pass; > char version[12]; > int *p_ids; > int i; > @@ -78,16 +77,16 @@ > bugzc_list p_list; > bugzc_conn conn; > bugzc_node *node; > - if(argc <= 1){ > - fprintf(stderr, "At least you must provide bugzilla's > server url\n"); > + if(argc <= 2){ > + fprintf(stderr, "At least you must provide bugzilla's > server url > and login\n"); > return 0; > } > if(strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0){ > - printf("%s --help\n%s <url> [username]\n\n"); > + printf("%s --help\n%s <url> [username]\n\n", argv[0], > argv[0]); > return 0; > } > url = argv[1]; > - > + login = argv[2]; > bugzc_init2(&conn, url); > printf("Bugzilla version at: %s ", conn.url); > fflush(stdout); > @@ -109,20 +108,9 @@ > fprintf(stderr, "%s\n", conn.xenv.fault_string); > return 1; > } > - if(argc > 2){ > - login = argv[2]; > - printf("\nLogin "); > - } > - else{ > - login = malloc(100); > - printf("\nLogin (or e-mail): "); > - login[99] = 0; > - fgets(login, 98, stdin); > - } > - printf("Password: "); > - fgets(pw, 23, stdin); > + pass = getpass("Enter bugzilla password: "); > /* Perform login */ > - if(bugzc_user_login(&conn, login, pw, 0) < 0){ > + if(bugzc_user_login(&conn, login, pass, 0) < 0){ > if(conn.err_code != 0){ > fprintf(stderr, "\n"); > if(conn.xenv.fault_occurred){ > @@ -135,7 +123,6 @@ > } > return 1; > } > - pw[0] = 0; > bugzc_list_create(&list); > printf("Selectable product ids: "); > if(bugzc_product_get_selectable_products(&conn, &list) < 0){ > Index: get_legal_field_values.c > =================================================================== > --- get_legal_field_values.c (revision 23) > +++ get_legal_field_values.c (working copy) > @@ -13,6 +13,7 @@ > #include<stdio.h> > #include<string.h> > #include<stdlib.h> > +#include<unistd.h> > #include<bugzc/bugzc.h> > > char *fgets_s(char *str, size_t siz, FILE *fptr){ > @@ -31,22 +32,21 @@ > char *login; > char *field_name; > char *product_name; > - char pw[24]; > + char *pass; > char version[12]; > bugzc_list list; > - int i; > bugzc_conn conn; > bugzc_node *node; > - if(argc <= 1){ > - fprintf(stderr, "At least you must provide bugzilla's > server url\n"); > + if(argc <= 2){ > + fprintf(stderr, "At least you must provide bugzilla's > server url > and login\n"); > return 0; > } > if(strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0){ > - printf("%s --help\n%s <url> [username] [field_name] > [product_name]\n\n"); > + printf("%s --help\n%s <url> [username] [field_name] > [product_name]\n\n", argv[0], argv[0]); > return 0; > } > url = argv[1]; > - > + login = argv[2]; > bugzc_init2(&conn, url); > printf("Bugzilla version at: %s ", conn.url); > fflush(stdout); > @@ -68,20 +68,9 @@ > fprintf(stderr, "%s\n", conn.xenv.fault_string); > return 1; > } > - if(argc > 2){ > - login = argv[2]; > - printf("\nLogin "); > - } > - else{ > - login = malloc(100); > - printf("\nLogin (or e-mail): "); > - login[99] = 0; > - fgets(login, 98, stdin); > - } > - printf("Password: "); > - fgets(pw, 23, stdin); > + pass = getpass("Enter bugzilla password: "); > /* Perform login */ > - if(bugzc_user_login(&conn, login, pw, 0) < 0){ > + if(bugzc_user_login(&conn, login, pass, 0) < 0){ > if(conn.err_code != 0){ > fprintf(stderr, "\n"); > if(conn.xenv.fault_occurred){ > @@ -94,7 +83,6 @@ > } > return 1; > } > - pw[0] = 0; > if(argc > 3){ > field_name = argv[3]; > if(argc > 4) printf("\n"); > Index: bugz_create_user.c > =================================================================== > --- bugz_create_user.c (revision 23) > +++ bugz_create_user.c (working copy) > @@ -13,6 +13,7 @@ > #include<stdio.h> > #include<string.h> > #include<stdlib.h> > +#include<unistd.h> > #include<bugzc/bugzc.h> > > char *fgets_s(char *str, size_t siz, FILE *fptr){ > @@ -29,13 +30,13 @@ > int main(int argc, char *argv[]){ > char *url; > char *login; > - char pw[24]; > + char *pass; > char email[80]; > char fullname[80]; > char password[80]; > char version[12]; > bugzc_conn conn; > - if(argc <= 1){ > + if(argc <= 2){ > fprintf(stderr, "At least you must provide bugzilla's server > url" \ > " and your user login after > that.\n"); > return 0; > @@ -45,7 +46,6 @@ > > bugzc_init2(&conn, url); > printf("Bugzilla version at: %s ", conn.url); > - fflush(stdout); > if(bugzc_bugzilla_version(&conn, version, 12) < 0){ > if(conn.err_code != 0){ > fprintf(stderr, "\n"); > @@ -59,9 +59,9 @@ > return 1; > } > printf("is %s\n", version); > - printf("Enter password for %s: ", login); > - fgets(pw, 23, stdin); > - if(bugzc_user_login(&conn, login, pw, 0) < 0){ > + fflush(stdout); > + pass = getpass("Enter bugzilla password: "); > + if(bugzc_user_login(&conn, login, pass, 0) < 0){ > if(conn.err_code != 0){ > fprintf(stderr, "\n"); > if(conn.xenv.fault_occurred){ > @@ -73,7 +73,6 @@ > } > return 1; > } > - pw[0] = 0; > printf("Ready to create new user account...\n"); > printf("e-mail: "); > fgets_s(email, 79, stdin); > Index: testlogin.c > =================================================================== > --- testlogin.c (revision 23) > +++ testlogin.c (working copy) > @@ -13,22 +13,23 @@ > #include<stdio.h> > #include<string.h> > #include<stdlib.h> > +#include<unistd.h> > #include<bugzc/bugzc.h> > > > int main(int argc, char *argv[]){ > char *url; > char *login; > - char pw[24]; > + char *pass; > char version[12]; > char tzone[12]; > bugzc_conn conn; > - if(argc <= 1){ > - fprintf(stderr, "At least you must provide bugzilla's > server url\n"); > + if(argc <= 2){ > + fprintf(stderr, "At least you must provide bugzilla's > server url > and login\n"); > return 0; > } > url = argv[1]; > - > + login = argv[2]; > bugzc_init2(&conn, url); > printf("Bugzilla version at: %s ", conn.url); > fflush(stdout); > @@ -50,20 +51,9 @@ > fprintf(stderr, "%s\n", conn.xenv.fault_string); > return 1; > } > - if(argc > 2){ > - login = argv[2]; > - printf("\nLogin "); > - } > - else{ > - login = malloc(1024); > - printf("\nLogin (or e-mail): "); > - login[1023] = 0; > - fgets(login, 1022, stdin); > - } > - printf("Password: "); > - fgets(pw, 23, stdin); > + pass = getpass("Enter bugzilla password: "); > /* Perform login */ > - if(bugzc_user_login(&conn, login, pw, 0) < 0){ > + if(bugzc_user_login(&conn, login, pass, 0) < 0){ > if(conn.err_code != 0){ > fprintf(stderr, "\n"); > if(conn.xenv.fault_occurred){ > @@ -76,7 +66,6 @@ > } > return 1; > } > - pw[0] = 0; > printf("Server timezone: "); > fflush(stdout); > if(bugzc_bugzilla_timezone(&conn, tzone, 12) < 0){ > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Bugzcxx-devel mailing list > Bug...@li... > https://lists.sourceforge.net/lists/listinfo/bugzcxx-devel > -- In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it's the exact opposite. -- Paul A. M. Dirac |
From: BugzCXX D. <bug...@li...> - 2010-01-07 10:27:21
|
There is a more clean patch at: http://rakesh.fedorapeople.org/misc/bugzcxx_patch_1.diff Will apply from trunk using: $ patch -p0 < ~/bugzcxx_patch_1.diff Regards, Rakesh Pandit |
From: BugzCXX D. <bug...@li...> - 2010-01-07 10:23:00
|
Hello Juan, I was trying examples with live bugzilla.redhat.com using this line: [rakesh@simu bugzc]$ ./getbugs https://bugzilla.redhat.com/xmlrpc.cgi rp...@re... 543433 Bugzilla version at: https://bugzilla.redhat.com/xmlrpc.cgi is 3.2.5+ Enter bugzilla password: Querying info for #543433... Bug id: 543433 Summary: Created On: � (4244782496754601) Last Change On: (4244782496754601) /builddir/build/BUILD/xmlrpc-c-1.16.6/src/xmlrpc_client.c:622: assertion failed Aborted (core dumped) [rakesh@simu bugzc]$ It gets bug details but gets a SIGABRT at bugzc_user_logout(&conn); call in same example. Upon investigating I found following function call from bugzc_bug.c at line 604 sets the bconn->xenv to {fault_occurred = 1, fault_code = -501, fault_string = 0x626f50 "Value of type ARRAY supplied where string type was expected."} which means their is something wrong in there. May you suggest what could be wrong with the expected format we are supplying in this call ? xmlrpc_decompose_value(&bconn->xenv, bug_item, "{s:s,s:i,s:s,s:8,s:8,*}", "summary", &b_summary, "id", &tmp_id, "alias", &b_alias, "creation_time", &b_ctime, "last_change_time", &b_lctime ); One more question, how do I investigate or come to know which API call will throw what type of information so that I can select proper format in decompose value function ? Below is a patch which fixes examples a bit more and makes them sane. May you review it before I can commit ? Can I commit now or you will approve my commit access in some time ? Log: 1. Fixed password entry in all tests and made login as mandatory argument. 2. Removed unused variables. Regards, -- Rakesh Pandit https://fedoraproject.org/wiki/User:Rakesh freedom, friends, features, first Index: submit_bug.c =================================================================== --- submit_bug.c (revision 23) +++ submit_bug.c (working copy) @@ -13,6 +13,7 @@ #include<stdio.h> #include<string.h> #include<stdlib.h> +#include<unistd.h> #include<bugzc/bugzc.h> char *fgets_s(char *str, size_t siz, FILE *fptr){ @@ -29,10 +30,8 @@ int main(int argc, char *argv[]){ char *url; char *login; - char pw[24]; + char *pass; char version[12]; - int i; - char product[65]; char component[65]; char summary[256]; @@ -48,15 +47,15 @@ description[0] = 0; if(argc <= 1){ - fprintf(stderr, "At least you must provide bugzilla's server url\n"); + fprintf(stderr, "At least you must provide bugzilla's server url and login\n"); return 0; } if(strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0){ - printf("%s --help\n%s <url> [username] [field_name] [product_name]\n\n"); + printf("%s --help\n%s <url> [username] [field_name] [product_name]\n\n", argv[0], argv[0]); return 0; } url = argv[1]; - + login = argv[2]; bugzc_init2(&conn, url); printf("Bugzilla version at: %s ", conn.url); fflush(stdout); @@ -78,20 +77,9 @@ fprintf(stderr, "%s\n", conn.xenv.fault_string); return 1; } - if(argc > 2){ - login = argv[2]; - printf("\nLogin "); - } - else{ - login = malloc(100); - printf("\nLogin (or e-mail): "); - login[99] = 0; - fgets_s(login, 98, stdin); - } - printf("Password: "); - fgets_s(pw, 23, stdin); + pass = getpass("Enter bugzilla password: "); /* Perform login */ - if(bugzc_user_login(&conn, login, pw, 0) < 0){ + if(bugzc_user_login(&conn, login, pass, 0) < 0){ if(conn.err_code != 0){ fprintf(stderr, "\n"); if(conn.xenv.fault_occurred){ @@ -104,7 +92,6 @@ } return 1; } - pw[0] = 0; printf("Product: "); fgets_s(product, 64, stdin); printf("Component: "); Index: get_products.c =================================================================== --- get_products.c (revision 23) +++ get_products.c (working copy) @@ -13,6 +13,7 @@ #include<stdio.h> #include<string.h> #include<stdlib.h> +#include<unistd.h> #include<bugzc/bugzc.h> @@ -67,9 +68,7 @@ int main(int argc, char *argv[]){ char *url; char *login; - char *field_name; - char *product_name; - char pw[24]; + char *pass; char version[12]; int *p_ids; int i; @@ -78,16 +77,16 @@ bugzc_list p_list; bugzc_conn conn; bugzc_node *node; - if(argc <= 1){ - fprintf(stderr, "At least you must provide bugzilla's server url\n"); + if(argc <= 2){ + fprintf(stderr, "At least you must provide bugzilla's server url and login\n"); return 0; } if(strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0){ - printf("%s --help\n%s <url> [username]\n\n"); + printf("%s --help\n%s <url> [username]\n\n", argv[0], argv[0]); return 0; } url = argv[1]; - + login = argv[2]; bugzc_init2(&conn, url); printf("Bugzilla version at: %s ", conn.url); fflush(stdout); @@ -109,20 +108,9 @@ fprintf(stderr, "%s\n", conn.xenv.fault_string); return 1; } - if(argc > 2){ - login = argv[2]; - printf("\nLogin "); - } - else{ - login = malloc(100); - printf("\nLogin (or e-mail): "); - login[99] = 0; - fgets(login, 98, stdin); - } - printf("Password: "); - fgets(pw, 23, stdin); + pass = getpass("Enter bugzilla password: "); /* Perform login */ - if(bugzc_user_login(&conn, login, pw, 0) < 0){ + if(bugzc_user_login(&conn, login, pass, 0) < 0){ if(conn.err_code != 0){ fprintf(stderr, "\n"); if(conn.xenv.fault_occurred){ @@ -135,7 +123,6 @@ } return 1; } - pw[0] = 0; bugzc_list_create(&list); printf("Selectable product ids: "); if(bugzc_product_get_selectable_products(&conn, &list) < 0){ Index: get_legal_field_values.c =================================================================== --- get_legal_field_values.c (revision 23) +++ get_legal_field_values.c (working copy) @@ -13,6 +13,7 @@ #include<stdio.h> #include<string.h> #include<stdlib.h> +#include<unistd.h> #include<bugzc/bugzc.h> char *fgets_s(char *str, size_t siz, FILE *fptr){ @@ -31,22 +32,21 @@ char *login; char *field_name; char *product_name; - char pw[24]; + char *pass; char version[12]; bugzc_list list; - int i; bugzc_conn conn; bugzc_node *node; - if(argc <= 1){ - fprintf(stderr, "At least you must provide bugzilla's server url\n"); + if(argc <= 2){ + fprintf(stderr, "At least you must provide bugzilla's server url and login\n"); return 0; } if(strcmp(argv[1], "--help") == 0 || strcmp(argv[1], "-h") == 0){ - printf("%s --help\n%s <url> [username] [field_name] [product_name]\n\n"); + printf("%s --help\n%s <url> [username] [field_name] [product_name]\n\n", argv[0], argv[0]); return 0; } url = argv[1]; - + login = argv[2]; bugzc_init2(&conn, url); printf("Bugzilla version at: %s ", conn.url); fflush(stdout); @@ -68,20 +68,9 @@ fprintf(stderr, "%s\n", conn.xenv.fault_string); return 1; } - if(argc > 2){ - login = argv[2]; - printf("\nLogin "); - } - else{ - login = malloc(100); - printf("\nLogin (or e-mail): "); - login[99] = 0; - fgets(login, 98, stdin); - } - printf("Password: "); - fgets(pw, 23, stdin); + pass = getpass("Enter bugzilla password: "); /* Perform login */ - if(bugzc_user_login(&conn, login, pw, 0) < 0){ + if(bugzc_user_login(&conn, login, pass, 0) < 0){ if(conn.err_code != 0){ fprintf(stderr, "\n"); if(conn.xenv.fault_occurred){ @@ -94,7 +83,6 @@ } return 1; } - pw[0] = 0; if(argc > 3){ field_name = argv[3]; if(argc > 4) printf("\n"); Index: bugz_create_user.c =================================================================== --- bugz_create_user.c (revision 23) +++ bugz_create_user.c (working copy) @@ -13,6 +13,7 @@ #include<stdio.h> #include<string.h> #include<stdlib.h> +#include<unistd.h> #include<bugzc/bugzc.h> char *fgets_s(char *str, size_t siz, FILE *fptr){ @@ -29,13 +30,13 @@ int main(int argc, char *argv[]){ char *url; char *login; - char pw[24]; + char *pass; char email[80]; char fullname[80]; char password[80]; char version[12]; bugzc_conn conn; - if(argc <= 1){ + if(argc <= 2){ fprintf(stderr, "At least you must provide bugzilla's server url" \ " and your user login after that.\n"); return 0; @@ -45,7 +46,6 @@ bugzc_init2(&conn, url); printf("Bugzilla version at: %s ", conn.url); - fflush(stdout); if(bugzc_bugzilla_version(&conn, version, 12) < 0){ if(conn.err_code != 0){ fprintf(stderr, "\n"); @@ -59,9 +59,9 @@ return 1; } printf("is %s\n", version); - printf("Enter password for %s: ", login); - fgets(pw, 23, stdin); - if(bugzc_user_login(&conn, login, pw, 0) < 0){ + fflush(stdout); + pass = getpass("Enter bugzilla password: "); + if(bugzc_user_login(&conn, login, pass, 0) < 0){ if(conn.err_code != 0){ fprintf(stderr, "\n"); if(conn.xenv.fault_occurred){ @@ -73,7 +73,6 @@ } return 1; } - pw[0] = 0; printf("Ready to create new user account...\n"); printf("e-mail: "); fgets_s(email, 79, stdin); Index: testlogin.c =================================================================== --- testlogin.c (revision 23) +++ testlogin.c (working copy) @@ -13,22 +13,23 @@ #include<stdio.h> #include<string.h> #include<stdlib.h> +#include<unistd.h> #include<bugzc/bugzc.h> int main(int argc, char *argv[]){ char *url; char *login; - char pw[24]; + char *pass; char version[12]; char tzone[12]; bugzc_conn conn; - if(argc <= 1){ - fprintf(stderr, "At least you must provide bugzilla's server url\n"); + if(argc <= 2){ + fprintf(stderr, "At least you must provide bugzilla's server url and login\n"); return 0; } url = argv[1]; - + login = argv[2]; bugzc_init2(&conn, url); printf("Bugzilla version at: %s ", conn.url); fflush(stdout); @@ -50,20 +51,9 @@ fprintf(stderr, "%s\n", conn.xenv.fault_string); return 1; } - if(argc > 2){ - login = argv[2]; - printf("\nLogin "); - } - else{ - login = malloc(1024); - printf("\nLogin (or e-mail): "); - login[1023] = 0; - fgets(login, 1022, stdin); - } - printf("Password: "); - fgets(pw, 23, stdin); + pass = getpass("Enter bugzilla password: "); /* Perform login */ - if(bugzc_user_login(&conn, login, pw, 0) < 0){ + if(bugzc_user_login(&conn, login, pass, 0) < 0){ if(conn.err_code != 0){ fprintf(stderr, "\n"); if(conn.xenv.fault_occurred){ @@ -76,7 +66,6 @@ } return 1; } - pw[0] = 0; printf("Server timezone: "); fflush(stdout); if(bugzc_bugzilla_timezone(&conn, tzone, 12) < 0){ |