Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
c64133c1
Commit
c64133c1
authored
15 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
fix faulty error handling in finding method lists, add bump_fixed tag support.
parent
524b64a6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zmapServer/acedb/acedbServer.c
+40
-30
40 additions, 30 deletions
src/zmapServer/acedb/acedbServer.c
with
40 additions
and
30 deletions
src/zmapServer/acedb/acedbServer.c
+
40
−
30
View file @
c64133c1
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See zmapServer.h
* HISTORY:
* Last edited: Apr
28
15:5
1
2009 (edgrif)
* Last edited: Apr
30
15:5
8
2009 (edgrif)
* Created: Wed Aug 6 15:46:38 2003 (edgrif)
* CVS info: $Id: acedbServer.c,v 1.12
8
2009-04-
28 14:51:59
edgrif Exp $
* CVS info: $Id: acedbServer.c,v 1.12
9
2009-04-
30 15:00:07
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -872,33 +872,34 @@ static ZMapServerResponseType findColStyleTags(AcedbServer server,
/* 2) Check that all feature methods have a style, any that don't will be excluded.
* Also check whether any reference a parent column group. Update hash of both for
* reference in reading features. */
if
(
result
!=
ZMAP_SERVERRESPONSE_REQFAIL
)
{
/* 2a) Get all methods into acedb's active keyset. */
num_orig
=
g_list_length
(
feature_methods
)
;
/* 2a) Get all methods into acedb's active keyset. */
num_orig
=
g_list_length
(
feature_methods
)
;
method_string
=
getMethodString
(
feature_methods
,
TRUE
,
TRUE
,
TRUE
)
;
method_string
=
getMethodString
(
feature_methods
,
TRUE
,
TRUE
,
TRUE
)
;
if
((
result
=
findMethods
(
server
,
method_string
,
&
num_curr
))
!=
ZMAP_SERVERRESPONSE_OK
)
{
result
=
ZMAP_SERVERRESPONSE_REQFAIL
;
ZMAPSERVER_LOG
(
Critical
,
ACEDB_PROTOCOL_STR
,
server
->
host
,
"Could not find feature set methods in server because: %s"
,
server
->
last_err_msg
)
;
}
else
if
(
num_orig
!=
num_curr
)
{
result
=
ZMAP_SERVERRESPONSE_REQFAIL
;
if
((
result
=
findMethods
(
server
,
method_string
,
&
num_curr
))
!=
ZMAP_SERVERRESPONSE_OK
)
{
result
=
ZMAP_SERVERRESPONSE_REQFAIL
;
ZMAPSERVER_LOG
(
Critical
,
ACEDB_PROTOCOL_STR
,
server
->
host
,
"Could not find feature set methods in server because: %s"
,
server
->
last_err_msg
)
;
}
else
if
(
num_orig
!=
num_curr
)
{
result
=
ZMAP_SERVERRESPONSE_REQFAIL
;
if
(
num_orig
>
num_curr
)
ZMAPSERVER_LOG
(
Warning
,
ACEDB_PROTOCOL_STR
,
server
->
host
,
"%s"
,
"Some featuresets could not be found."
)
;
else
ZMAPSERVER_LOG
(
Critical
,
ACEDB_PROTOCOL_STR
,
server
->
host
,
"%s"
,
"Too many featuresets found ! Ace Server Query probably incorrect !"
)
;
}
if
(
num_orig
>
num_curr
)
ZMAPSERVER_LOG
(
Warning
,
ACEDB_PROTOCOL_STR
,
server
->
host
,
"%s"
,
"Some featuresets could not be found."
)
;
else
ZMAPSERVER_LOG
(
Critical
,
ACEDB_PROTOCOL_STR
,
server
->
host
,
"%s"
,
"Too many featuresets found ! Ace Server Query probably incorrect !"
)
;
g_free
(
method_string
)
;
}
g_free
(
method_string
)
;
/* 2b) Check all methods were found, remove any methods that were not, we fail if no methods are found. */
if
(
result
!=
ZMAP_SERVERRESPONSE_REQFAIL
)
...
...
@@ -1107,7 +1108,9 @@ static void addTypeName(gpointer data, gpointer user_data)
types_data
->
first_method
=
FALSE
;
if
(
types_data
->
find_string
)
g_string_append_printf
(
types_data
->
str
,
"
\"
%s
\"
"
,
type_name
)
;
{
g_string_append_printf
(
types_data
->
str
,
"
\"
%s
\"
"
,
type_name
)
;
}
else
types_data
->
str
=
g_string_append
(
types_data
->
str
,
type_name
)
;
...
...
@@ -3162,6 +3165,7 @@ ZMapFeatureTypeStyle parseStyle(char *style_str_in,
ZMapStyleBumpMode
default_bump_mode
=
ZMAPBUMP_INVALID
,
curr_bump_mode
=
ZMAPBUMP_INVALID
;
gboolean
bump_spacing_set
=
FALSE
;
double
bump_spacing
=
0
.
0
;
gboolean
bump_fixed
=
FALSE
;
gboolean
some_colours
=
FALSE
;
StyleFeatureColoursStruct
style_colours
=
{{
NULL
},
{
NULL
}}
;
gboolean
some_frame0_colours
=
FALSE
,
some_frame1_colours
=
FALSE
,
some_frame2_colours
=
FALSE
;
...
...
@@ -3389,12 +3393,12 @@ ZMapFeatureTypeStyle parseStyle(char *style_str_in,
}
/* Bumping types */
else
if
(
g_ascii_strcasecmp
(
tag
,
"Bump_
mode
"
)
==
0
||
g_ascii_strcasecmp
(
tag
,
"Bump_default"
)
==
0
)
else
if
(
g_ascii_strcasecmp
(
tag
,
"Bump_
initial
"
)
==
0
||
g_ascii_strcasecmp
(
tag
,
"Bump_default"
)
==
0
)
{
char
*
tmp_next_tag
;
ZMapStyleBumpMode
*
tmp_bump
;
if
(
g_ascii_strcasecmp
(
tag
,
"Bump_
mode
"
)
==
0
)
if
(
g_ascii_strcasecmp
(
tag
,
"Bump_
initial
"
)
==
0
)
{
tmp_bump
=
&
curr_bump_mode
;
bump_mode_set
=
TRUE
;
...
...
@@ -3448,6 +3452,10 @@ ZMapFeatureTypeStyle parseStyle(char *style_str_in,
break
;
}
}
else
if
(
g_ascii_strcasecmp
(
tag
,
"Bump_fixed"
)
==
0
)
{
bump_fixed
=
TRUE
;
}
else
if
(
g_ascii_strcasecmp
(
tag
,
"GFF"
)
==
0
)
{
char
*
gff_type
;
...
...
@@ -3675,6 +3683,10 @@ ZMapFeatureTypeStyle parseStyle(char *style_str_in,
if
(
bump_spacing_set
)
zMapStyleSetBumpSpace
(
style
,
bump_spacing
)
;
if
(
bump_fixed
)
zMapStyleSet
(
style
,
ZMAPSTYLE_PROPERTY_BUMP_FIXED
,
bump_fixed
,
NULL
)
;
if
(
gff_source
||
gff_feature
)
zMapStyleSetGFF
(
style
,
gff_source
,
gff_feature
)
;
...
...
@@ -3685,8 +3697,6 @@ ZMapFeatureTypeStyle parseStyle(char *style_str_in,
if
(
col_state
!=
ZMAPSTYLE_COLDISPLAY_INVALID
)
zMapStyleSetDisplay
(
style
,
col_state
)
;
if
(
show_when_empty_set
)
zMapStyleSetShowWhenEmpty
(
style
,
show_when_empty
)
;
...
...
@@ -3706,8 +3716,8 @@ ZMapFeatureTypeStyle parseStyle(char *style_str_in,
* my zMapStyleCreateV() function. */
if
(
blixem_type
)
zMapStyleSet
(
style
,
"alignment-blixem"
,
blixem_type
,
"allow-misalign"
,
allow_misalign
,
ZMAPSTYLE_PROPERTY_ALIGNMENT_BLIXEM
,
blixem_type
,
ZMAPSTYLE_PROPERTY_ALIGNMENT_ALLOW_MISALIGN
,
allow_misalign
,
NULL
)
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment