~ubuntu-branches/debian/stretch/flickcurl/stretch

« back to all changes in this revision

Viewing changes to utils/list-methods.c

  • Committer: Package Import Robot
  • Author(s): Kumar Appaiah
  • Date: 2012-02-07 22:46:03 UTC
  • mfrom: (1.3.4)
  • Revision ID: package-import@ubuntu.com-20120207224603-i0ly9jgk5tkhha2e
Tags: 1.22-1
* New upstream release (Closes: #635892, #637196)
* No need to use quilt (patch removed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
}
79
79
 
80
80
 
81
 
static void
82
 
my_set_config_var_handler(void* userdata, const char* key, const char* value)
83
 
{
84
 
  flickcurl *fc = (flickcurl *)userdata;
85
 
  
86
 
  if(!strcmp(key, "api_key"))
87
 
    flickcurl_set_api_key(fc, value);
88
 
  else if(!strcmp(key, "secret"))
89
 
    flickcurl_set_shared_secret(fc, value);
90
 
  else if(!strcmp(key, "auth_token"))
91
 
    flickcurl_set_auth_token(fc, value);
92
 
}
93
 
 
94
 
 
95
81
#ifdef HAVE_GETOPT_LONG
96
82
#define HELP_TEXT(short, long, description) "  -" short ", --" long "  " description
97
83
#define HELP_TEXT_LONG(long, description) "      --" long "  " description
245
231
  flickcurl_set_error_handler(fc, my_message_handler, NULL);
246
232
 
247
233
  if(read_auth && !access((const char*)config_path, R_OK)) {
248
 
    if(read_ini_config(config_path, config_section, fc,
249
 
                       my_set_config_var_handler)) {
250
 
      fprintf(stderr, "%s: Failed to read config filename %s: %s\n",
251
 
              program, config_path, strerror(errno));
 
234
    if(flickcurl_config_read_ini(fc, config_path, config_section, fc,
 
235
                                 flickcurl_config_var_handler)) {
252
236
      rc = 1;
253
237
      goto tidy;
254
238
    }