Description: Upstream changes introduced in version 0.6.30+dfsg-1
 This patch has been created by dpkg-source during the package build.
 Here's the last changelog entry, hopefully it gives details on why
 those changes were made:
 .
 gnokii (0.6.30+dfsg-1) unstable; urgency=low
 .
   * new upstream release
     - fixes FTBFS with libpcsclite (closes: 614442, 593509)
     - fix DKU2 issues (closes: 591658)
   * debian/control:
     - bump policy to 3.9.2:
       - clean .la files
     - convert package to git
   * debian/patches:
     - add upstream patch to change search order of config files
       (closes: #623694)
   * debian/rules: clean up .la files' dependencies (closes: 620903)
     (thanks Andreas Moog)
 .
 The person named in the Author field signed this changelog entry.
Author: Leo Costela <costela@debian.org>
Bug-Debian: http://bugs.debian.org/591658
Bug-Debian: http://bugs.debian.org/593509
Bug-Debian: http://bugs.debian.org/614442
Bug-Debian: http://bugs.debian.org/620903
Bug-Debian: http://bugs.debian.org/623694

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- gnokii-0.6.30+dfsg.orig/common/cfgreader.c
+++ gnokii-0.6.30+dfsg/common/cfgreader.c
@@ -1090,13 +1090,7 @@ static char **get_locations(int *retval)
 	snprintf(path, MAX_PATH_LEN, "%s/gnokii/config", xdg_config_home);
 	config_file_locations[(*retval)++] = strdup(path);
 
-	/* old gnokii behaviour */
-	/* 2. $HOME/.gnokiirc */
-	snprintf(path, MAX_PATH_LEN, "%s/.gnokiirc", home);
-	config_file_locations[(*retval)++] = strdup(path);
-	CHECK_SIZE();
-
-	/* 3. $XDG_CONFIG_DIRS/gnokii/config (/etc/xdg) */
+	/* 2. $XDG_CONFIG_DIRS/gnokii/config (/etc/xdg) */
 	for (j = 0; j < i; j++) {
 		snprintf(path, MAX_PATH_LEN, "%s/gnokii/config", xdg_config_dir[j]);
 		config_file_locations[(*retval)++] = strdup(path);
@@ -1106,6 +1100,12 @@ static char **get_locations(int *retval)
 	free(xdg_config_dir);
 
 	/* old gnokii behaviour */
+
+	/* 3. $HOME/.gnokiirc */
+	snprintf(path, MAX_PATH_LEN, "%s/.gnokiirc", home);
+	config_file_locations[(*retval)++] = strdup(path);
+	CHECK_SIZE();
+
 	/* 4. /etc/gnokiirc */
 	snprintf(path, MAX_PATH_LEN, "/etc/gnokiirc");
 	config_file_locations[(*retval)++] = strdup(path);
--- gnokii-0.6.30+dfsg.orig/Docs/man/gnokii.1
+++ gnokii-0.6.30+dfsg/Docs/man/gnokii.1
@@ -38,9 +38,10 @@ incompatible. DO NOT use \fImodel = 6110
 reads configuration from \fIfilename\fR instead of trying default locations.
 Normally gnokii looks for config file in
 \fI$XDG_CONFIG_HOME/gnokii/config\fR (which is usually
-\fI$HOME/.config/gnokii/config\fR), \fI$HOME/.gnokiirc\fR (legacy),
+\fI$HOME/.config/gnokii/config\fR),
 \fI$XDG_CONFIG_DIRS/gnokii/config\fR (which is usually
-\fI/etc/xdg/gnokii/config\fR) and \fI/etc/gnokiirc\fR (legacy).
+\fI/etc/xdg/gnokii/config\fR),
+\fI$HOME/.gnokiirc\fR (legacy) and \fI/etc/gnokiirc\fR (legacy).
 .TP 
 .BR "\-\-phone \fIname\fP"
 usees parameters from the given phone section of your config file. A phone section named 'foo' starts with [phone_foo] and is used as \-\-phone foo
